summaryrefslogtreecommitdiff
path: root/arch/mips/ath79/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/ath79/setup.c')
-rw-r--r--arch/mips/ath79/setup.c44
1 files changed, 17 insertions, 27 deletions
diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
index ea385a865781..4e18cdcf65a0 100644
--- a/arch/mips/ath79/setup.c
+++ b/arch/mips/ath79/setup.c
@@ -15,7 +15,7 @@
#include <linux/memblock.h>
#include <linux/err.h>
#include <linux/clk.h>
-#include <linux/clk-provider.h>
+#include <linux/of_clk.h>
#include <linux/of_fdt.h>
#include <linux/irqchip.h>
@@ -23,7 +23,6 @@
#include <asm/idle.h>
#include <asm/time.h> /* for mips_hpt_frequency */
#include <asm/reboot.h> /* for _machine_{restart,halt} */
-#include <asm/mips_machine.h>
#include <asm/prom.h>
#include <asm/fw/fw.h>
@@ -35,15 +34,6 @@
static char ath79_sys_type[ATH79_SYS_TYPE_LEN];
-static void ath79_restart(char *command)
-{
- local_irq_disable();
- ath79_device_reset_set(AR71XX_RESET_FULL_CHIP);
- for (;;)
- if (cpu_wait)
- cpu_wait();
-}
-
static void ath79_halt(void)
{
while (1)
@@ -153,8 +143,7 @@ static void __init ath79_detect_sys_type(void)
case REV_ID_MAJOR_QCA9533_V2:
ver = 2;
ath79_soc_rev = 2;
- /* fall through */
-
+ fallthrough;
case REV_ID_MAJOR_QCA9533:
ath79_soc = ATH79_SOC_QCA9533;
chip = "9533";
@@ -179,6 +168,12 @@ static void __init ath79_detect_sys_type(void)
rev = id & QCA956X_REV_ID_REVISION_MASK;
break;
+ case REV_ID_MAJOR_QCN550X:
+ ath79_soc = ATH79_SOC_QCA956X;
+ chip = "550X";
+ rev = id & QCA956X_REV_ID_REVISION_MASK;
+ break;
+
case REV_ID_MAJOR_TP9343:
ath79_soc = ATH79_SOC_TP9343;
chip = "9343";
@@ -215,27 +210,27 @@ unsigned int get_c0_compare_int(void)
void __init plat_mem_setup(void)
{
- unsigned long fdt_start;
+ void *dtb;
set_io_port_base(KSEG1);
/* Get the position of the FDT passed by the bootloader */
- fdt_start = fw_getenvl("fdt_start");
- if (fdt_start)
- __dt_setup_arch((void *)KSEG0ADDR(fdt_start));
- else if (fw_passed_dtb)
- __dt_setup_arch((void *)KSEG0ADDR(fw_passed_dtb));
+ dtb = (void *)fw_getenvl("fdt_start");
+ if (dtb == NULL)
+ dtb = get_fdt();
+
+ if (dtb)
+ __dt_setup_arch((void *)KSEG0ADDR(dtb));
- ath79_reset_base = ioremap_nocache(AR71XX_RESET_BASE,
+ ath79_reset_base = ioremap(AR71XX_RESET_BASE,
AR71XX_RESET_SIZE);
- ath79_pll_base = ioremap_nocache(AR71XX_PLL_BASE,
+ ath79_pll_base = ioremap(AR71XX_PLL_BASE,
AR71XX_PLL_SIZE);
ath79_detect_sys_type();
ath79_ddr_ctrl_init();
detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);
- _machine_restart = ath79_restart;
_machine_halt = ath79_halt;
pm_power_off = ath79_halt;
}
@@ -274,8 +269,3 @@ void __init arch_init_irq(void)
{
irqchip_init();
}
-
-void __init device_tree_init(void)
-{
- unflatten_and_copy_device_tree();
-}