diff options
author | John Crispin <blogic@openwrt.org> | 2012-04-12 12:33:56 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2012-04-12 12:33:56 +0000 |
commit | 37a565ab654f3ce80f9514e1e625d3bd07739e86 (patch) | |
tree | d933bb536eb34a7b28b804d06d8dac93d585fd62 /target/linux/lantiq/patches-3.2/0034-MIPS-lantiq-unify-xway-prom-code.patch | |
parent | 4879e3f58a284e6afd51899140abd6df30ef8408 (diff) | |
download | upstream-37a565ab654f3ce80f9514e1e625d3bd07739e86.tar.gz upstream-37a565ab654f3ce80f9514e1e625d3bd07739e86.tar.bz2 upstream-37a565ab654f3ce80f9514e1e625d3bd07739e86.zip |
[lantiq] update 3.2 patches
sync with lantiq kernel series
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31260 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches-3.2/0034-MIPS-lantiq-unify-xway-prom-code.patch')
-rw-r--r-- | target/linux/lantiq/patches-3.2/0034-MIPS-lantiq-unify-xway-prom-code.patch | 262 |
1 files changed, 262 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.2/0034-MIPS-lantiq-unify-xway-prom-code.patch b/target/linux/lantiq/patches-3.2/0034-MIPS-lantiq-unify-xway-prom-code.patch new file mode 100644 index 0000000000..7f426c9045 --- /dev/null +++ b/target/linux/lantiq/patches-3.2/0034-MIPS-lantiq-unify-xway-prom-code.patch @@ -0,0 +1,262 @@ +From f2c407ca7b975f979b0d73d2e52a73991de13dd9 Mon Sep 17 00:00:00 2001 +From: John Crispin <blogic@openwrt.org> +Date: Thu, 8 Mar 2012 11:44:55 +0100 +Subject: [PATCH 34/73] MIPS: lantiq: unify xway prom code + +The xway prom-ase.c and prom-xway.c files are redundant. Unify the 2 files. + +Signed-off-by: John Crispin <blogic@openwrt.org> +--- + arch/mips/lantiq/xway/Makefile | 5 +-- + arch/mips/lantiq/xway/Makefile.rej | 11 ----- + arch/mips/lantiq/xway/prom-ase.c | 48 ---------------------- + arch/mips/lantiq/xway/prom-xway.c | 64 ----------------------------- + arch/mips/lantiq/xway/prom.c | 79 ++++++++++++++++++++++++++++++++++++ + 5 files changed, 80 insertions(+), 127 deletions(-) + delete mode 100644 arch/mips/lantiq/xway/Makefile.rej + delete mode 100644 arch/mips/lantiq/xway/prom-ase.c + delete mode 100644 arch/mips/lantiq/xway/prom-xway.c + create mode 100644 arch/mips/lantiq/xway/prom.c + +diff --git a/arch/mips/lantiq/xway/Makefile b/arch/mips/lantiq/xway/Makefile +index 4dcb96f..9d1a0a2 100644 +--- a/arch/mips/lantiq/xway/Makefile ++++ b/arch/mips/lantiq/xway/Makefile +@@ -1,7 +1,4 @@ +-obj-y := sysctrl.o reset.o gpio.o gpio_stp.o gpio_ebu.o devices.o dma.o clk.o +- +-obj-$(CONFIG_SOC_XWAY) += prom-xway.o +-obj-$(CONFIG_SOC_AMAZON_SE) += prom-ase.o ++obj-y := sysctrl.o reset.o gpio.o gpio_stp.o gpio_ebu.o devices.o dma.o clk.o prom.o + + obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o + obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o +diff --git a/arch/mips/lantiq/xway/Makefile.rej b/arch/mips/lantiq/xway/Makefile.rej +deleted file mode 100644 +index c0d5b52..0000000 +--- a/arch/mips/lantiq/xway/Makefile.rej ++++ /dev/null +@@ -1,11 +0,0 @@ +---- arch/mips/lantiq/xway/Makefile +-+++ arch/mips/lantiq/xway/Makefile +-@@ -1,7 +1,4 @@ +--obj-y := sysctrl.o reset.o gpio.o gpio_stp.o gpio_ebu.o devices.o dma.o clk.o +-- +--obj-$(CONFIG_SOC_XWAY) += prom-xway.o +--obj-$(CONFIG_SOC_AMAZON_SE) += prom-ase.o +-+obj-y := prom.o sysctrl.o reset.o gpio.o gpio_stp.o gpio_ebu.o devices.o dma.o clk.o +- +- obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o +- obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o +diff --git a/arch/mips/lantiq/xway/prom-ase.c b/arch/mips/lantiq/xway/prom-ase.c +deleted file mode 100644 +index 3f86a3b..0000000 +--- a/arch/mips/lantiq/xway/prom-ase.c ++++ /dev/null +@@ -1,48 +0,0 @@ +-/* +- * This program is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License version 2 as published +- * by the Free Software Foundation. +- * +- * Copyright (C) 2010 John Crispin <blogic@openwrt.org> +- */ +- +-#include <linux/export.h> +-#include <linux/clk.h> +-#include <asm/bootinfo.h> +-#include <asm/time.h> +- +-#include <lantiq_soc.h> +- +-#include "devices.h" +-#include "../prom.h" +- +-#define SOC_AMAZON_SE "Amazon_SE" +- +-#define PART_SHIFT 12 +-#define PART_MASK 0x0FFFFFFF +-#define REV_SHIFT 28 +-#define REV_MASK 0xF0000000 +- +-void __init ltq_soc_detect(struct ltq_soc_info *i) +-{ +- i->partnum = (ltq_r32(LTQ_MPS_CHIPID) & PART_MASK) >> PART_SHIFT; +- i->rev = (ltq_r32(LTQ_MPS_CHIPID) & REV_MASK) >> REV_SHIFT; +- sprintf(i->rev_type, "1.%d", i->rev); +- switch (i->partnum) { +- case SOC_ID_AMAZON_SE: +- i->name = SOC_AMAZON_SE; +- i->type = SOC_TYPE_AMAZON_SE; +- break; +- +- default: +- unreachable(); +- break; +- } +-} +- +-void __init ltq_soc_setup(void) +-{ +- ltq_register_ase_asc(); +- ltq_register_gpio(); +- ltq_register_wdt(); +-} +diff --git a/arch/mips/lantiq/xway/prom-xway.c b/arch/mips/lantiq/xway/prom-xway.c +deleted file mode 100644 +index d823a92..0000000 +--- a/arch/mips/lantiq/xway/prom-xway.c ++++ /dev/null +@@ -1,64 +0,0 @@ +-/* +- * This program is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License version 2 as published +- * by the Free Software Foundation. +- * +- * Copyright (C) 2010 John Crispin <blogic@openwrt.org> +- */ +- +-#include <linux/export.h> +-#include <linux/clk.h> +-#include <asm/bootinfo.h> +-#include <asm/time.h> +- +-#include <lantiq_soc.h> +- +-#include "devices.h" +-#include "../prom.h" +- +-#define SOC_DANUBE "Danube" +-#define SOC_TWINPASS "Twinpass" +-#define SOC_AR9 "AR9" +- +-#define PART_SHIFT 12 +-#define PART_MASK 0x0FFFFFFF +-#define REV_SHIFT 28 +-#define REV_MASK 0xF0000000 +- +-void __init ltq_soc_detect(struct ltq_soc_info *i) +-{ +- i->partnum = (ltq_r32(LTQ_MPS_CHIPID) & PART_MASK) >> PART_SHIFT; +- i->rev = (ltq_r32(LTQ_MPS_CHIPID) & REV_MASK) >> REV_SHIFT; +- sprintf(i->rev_type, "1.%d", i->rev); +- switch (i->partnum) { +- case SOC_ID_DANUBE1: +- case SOC_ID_DANUBE2: +- i->name = SOC_DANUBE; +- i->type = SOC_TYPE_DANUBE; +- break; +- +- case SOC_ID_TWINPASS: +- i->name = SOC_TWINPASS; +- i->type = SOC_TYPE_DANUBE; +- break; +- +- case SOC_ID_ARX188: +- case SOC_ID_ARX168: +- case SOC_ID_ARX182: +- i->name = SOC_AR9; +- i->type = SOC_TYPE_AR9; +- break; +- +- default: +- unreachable(); +- break; +- } +-} +- +-void __init ltq_soc_setup(void) +-{ +- ltq_register_asc(0); +- ltq_register_asc(1); +- ltq_register_gpio(); +- ltq_register_wdt(); +-} +diff --git a/arch/mips/lantiq/xway/prom.c b/arch/mips/lantiq/xway/prom.c +new file mode 100644 +index 0000000..0929acb +--- /dev/null ++++ b/arch/mips/lantiq/xway/prom.c +@@ -0,0 +1,79 @@ ++/* ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published ++ * by the Free Software Foundation. ++ * ++ * Copyright (C) 2010 John Crispin <blogic@openwrt.org> ++ */ ++ ++#include <linux/export.h> ++#include <linux/clk.h> ++#include <asm/bootinfo.h> ++#include <asm/time.h> ++ ++#include <lantiq_soc.h> ++ ++#include "../prom.h" ++#include "devices.h" ++ ++#define SOC_DANUBE "Danube" ++#define SOC_TWINPASS "Twinpass" ++#define SOC_AR9 "AR9" ++#define SOC_VR9 "VR9" ++ ++#define PART_SHIFT 12 ++#define PART_MASK 0x0FFFFFFF ++#define REV_SHIFT 28 ++#define REV_MASK 0xF0000000 ++ ++#define SOC_AMAZON_SE "Amazon_SE" ++ ++void __init ltq_soc_detect(struct ltq_soc_info *i) ++{ ++ i->partnum = (ltq_r32(LTQ_MPS_CHIPID) & PART_MASK) >> PART_SHIFT; ++ i->rev = (ltq_r32(LTQ_MPS_CHIPID) & REV_MASK) >> REV_SHIFT; ++ sprintf(i->rev_type, "1.%d", i->rev); ++ switch (i->partnum) { ++ case SOC_ID_DANUBE1: ++ case SOC_ID_DANUBE2: ++ i->name = SOC_DANUBE; ++ i->type = SOC_TYPE_DANUBE; ++ break; ++ ++ case SOC_ID_TWINPASS: ++ i->name = SOC_TWINPASS; ++ i->type = SOC_TYPE_DANUBE; ++ break; ++ ++ case SOC_ID_ARX188: ++ case SOC_ID_ARX168: ++ case SOC_ID_ARX182: ++ i->name = SOC_AR9; ++ i->type = SOC_TYPE_AR9; ++ break; ++ ++ case SOC_ID_AMAZON_SE: ++ i->name = SOC_AMAZON_SE; ++ i->type = SOC_TYPE_AMAZON_SE; ++#ifdef CONFIG_PCI ++ panic("ase is only supported for non pci kernels"); ++#endif ++ break; ++ ++ default: ++ unreachable(); ++ break; ++ } ++} ++ ++void __init ltq_soc_setup(void) ++{ ++ if (ltq_is_ase()) { ++ ltq_register_ase_asc(); ++ } else { ++ ltq_register_asc(0); ++ ltq_register_asc(1); ++ } ++ ltq_register_gpio(); ++ ltq_register_wdt(); ++} +-- +1.7.9.1 + |