Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43cc739f authored by Sergey Ryazanov's avatar Sergey Ryazanov Committed by Ralf Baechle
Browse files

MIPS: ath25: add common parts



Add common code for Atheros AR5312 and Atheros AR2315 SoCs families.

Signed-off-by: default avatarSergey Ryazanov <ryazanov.s.a@gmail.com>
Cc: Linux MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/8237


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 484c3449
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

platforms += alchemy
platforms += ar7
platforms += ath25
platforms += ath79
platforms += bcm3384
platforms += bcm47xx
+12 −0
Original line number Diff line number Diff line
@@ -97,6 +97,18 @@ config AR7
	  Support for the Texas Instruments AR7 System-on-a-Chip
	  family: TNETD7100, 7200 and 7300.

config ATH25
	bool "Atheros AR231x/AR531x SoC support"
	select CEVT_R4K
	select CSRC_R4K
	select DMA_NONCOHERENT
	select IRQ_CPU
	select SYS_HAS_CPU_MIPS32_R1
	select SYS_SUPPORTS_BIG_ENDIAN
	select SYS_SUPPORTS_32BIT_KERNEL
	help
	  Support for Atheros AR231x and Atheros AR531x based boards

config ATH79
	bool "Atheros AR71XX/AR724X/AR913X based boards"
	select ARCH_REQUIRE_GPIOLIB
+11 −0
Original line number Diff line number Diff line
#
# This file is subject to the terms and conditions of the GNU General Public
# License.  See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 2006 FON Technology, SL.
# Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org>
# Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org>
#

obj-y += board.o prom.o devices.o
+6 −0
Original line number Diff line number Diff line
#
# Atheros AR531X/AR231X WiSoC
#
platform-$(CONFIG_ATH25)	+= ath25/
cflags-$(CONFIG_ATH25)		+= -I$(srctree)/arch/mips/include/asm/mach-ath25
load-$(CONFIG_ATH25)		+= 0xffffffff80041000
+51 −0
Original line number Diff line number Diff line
/*
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 2003 Atheros Communications, Inc.,  All Rights Reserved.
 * Copyright (C) 2006 FON Technology, SL.
 * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org>
 * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org>
 */

#include <linux/init.h>
#include <linux/interrupt.h>
#include <asm/irq_cpu.h>
#include <asm/reboot.h>
#include <asm/bootinfo.h>
#include <asm/time.h>

static void ath25_halt(void)
{
	local_irq_disable();
	unreachable();
}

void __init plat_mem_setup(void)
{
	_machine_halt = ath25_halt;
	pm_power_off = ath25_halt;

	/* Disable data watchpoints */
	write_c0_watchlo0(0);
}

asmlinkage void plat_irq_dispatch(void)
{
}

void __init plat_time_init(void)
{
}

unsigned int __cpuinit get_c0_compare_int(void)
{
	return CP0_LEGACY_COMPARE_IRQ;
}

void __init arch_init_irq(void)
{
	clear_c0_status(ST0_IM);
	mips_cpu_irq_init();
}
Loading