Commit 899dd6cc authored by Kevin Hilman's avatar Kevin Hilman

Merge tag 'integrator-v3.14-1' of...

Merge tag 'integrator-v3.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/dt

From Linus Walleij:
Two integrator device tree patches for v3.14:

- Delete some static core module mappings.

- Move EBI location to the device tree.

* tag 'integrator-v3.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator:
  ARM: integrator: move EBI to the device tree
  ARM: integrator: delete static core module mappings
Signed-off-by: default avatarKevin Hilman <khilman@linaro.org>
parents 374dc56b 307b9667
...@@ -14,6 +14,9 @@ Required nodes: ...@@ -14,6 +14,9 @@ Required nodes:
- core-module: the root node to the Integrator platforms must have - core-module: the root node to the Integrator platforms must have
a core-module with regs and the compatible string a core-module with regs and the compatible string
"arm,core-module-integrator" "arm,core-module-integrator"
- external-bus-interface: the root node to the Integrator platforms
must have an external bus interface with regs and the
compatible-string "arm,external-bus-interface"
Required properties for the core module: Required properties for the core module:
- regs: the location and size of the core module registers, one - regs: the location and size of the core module registers, one
...@@ -48,6 +51,11 @@ Required nodes: ...@@ -48,6 +51,11 @@ Required nodes:
reg = <0x10000000 0x200>; reg = <0x10000000 0x200>;
}; };
ebi@12000000 {
compatible = "arm,external-bus-interface";
reg = <0x12000000 0x100>;
};
syscon { syscon {
compatible = "arm,integrator-ap-syscon"; compatible = "arm,integrator-ap-syscon";
reg = <0x11000000 0x100>; reg = <0x11000000 0x100>;
......
...@@ -10,6 +10,11 @@ core-module@10000000 { ...@@ -10,6 +10,11 @@ core-module@10000000 {
reg = <0x10000000 0x200>; reg = <0x10000000 0x200>;
}; };
ebi@12000000 {
compatible = "arm,external-bus-interface";
reg = <0x12000000 0x100>;
};
timer@13000000 { timer@13000000 {
reg = <0x13000000 0x100>; reg = <0x13000000 0x100>;
interrupt-parent = <&pic>; interrupt-parent = <&pic>;
......
...@@ -63,6 +63,9 @@ ...@@ -63,6 +63,9 @@
/* Base address to the AP system controller */ /* Base address to the AP system controller */
void __iomem *ap_syscon_base; void __iomem *ap_syscon_base;
/* Base address to the external bus interface */
static void __iomem *ebi_base;
/* /*
* All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx
...@@ -72,15 +75,11 @@ void __iomem *ap_syscon_base; ...@@ -72,15 +75,11 @@ void __iomem *ap_syscon_base;
* just for now). * just for now).
*/ */
#define VA_IC_BASE __io_address(INTEGRATOR_IC_BASE) #define VA_IC_BASE __io_address(INTEGRATOR_IC_BASE)
#define VA_EBI_BASE __io_address(INTEGRATOR_EBI_BASE)
#define VA_CMIC_BASE __io_address(INTEGRATOR_HDR_IC)
/* /*
* Logical Physical * Logical Physical
* ef000000 Cache flush * ef000000 Cache flush
* f1000000 10000000 Core module registers
* f1100000 11000000 System controller registers * f1100000 11000000 System controller registers
* f1200000 12000000 EBI registers
* f1300000 13000000 Counter/Timer * f1300000 13000000 Counter/Timer
* f1400000 14000000 Interrupt controller * f1400000 14000000 Interrupt controller
* f1600000 16000000 UART 0 * f1600000 16000000 UART 0
...@@ -91,16 +90,6 @@ void __iomem *ap_syscon_base; ...@@ -91,16 +90,6 @@ void __iomem *ap_syscon_base;
static struct map_desc ap_io_desc[] __initdata __maybe_unused = { static struct map_desc ap_io_desc[] __initdata __maybe_unused = {
{ {
.virtual = IO_ADDRESS(INTEGRATOR_HDR_BASE),
.pfn = __phys_to_pfn(INTEGRATOR_HDR_BASE),
.length = SZ_4K,
.type = MT_DEVICE
}, {
.virtual = IO_ADDRESS(INTEGRATOR_EBI_BASE),
.pfn = __phys_to_pfn(INTEGRATOR_EBI_BASE),
.length = SZ_4K,
.type = MT_DEVICE
}, {
.virtual = IO_ADDRESS(INTEGRATOR_CT_BASE), .virtual = IO_ADDRESS(INTEGRATOR_CT_BASE),
.pfn = __phys_to_pfn(INTEGRATOR_CT_BASE), .pfn = __phys_to_pfn(INTEGRATOR_CT_BASE),
.length = SZ_4K, .length = SZ_4K,
...@@ -174,9 +163,6 @@ device_initcall(irq_syscore_init); ...@@ -174,9 +163,6 @@ device_initcall(irq_syscore_init);
/* /*
* Flash handling. * Flash handling.
*/ */
#define EBI_CSR1 (VA_EBI_BASE + INTEGRATOR_EBI_CSR1_OFFSET)
#define EBI_LOCK (VA_EBI_BASE + INTEGRATOR_EBI_LOCK_OFFSET)
static int ap_flash_init(struct platform_device *dev) static int ap_flash_init(struct platform_device *dev)
{ {
u32 tmp; u32 tmp;
...@@ -184,13 +170,15 @@ static int ap_flash_init(struct platform_device *dev) ...@@ -184,13 +170,15 @@ static int ap_flash_init(struct platform_device *dev)
writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP,
ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET);
tmp = readl(EBI_CSR1) | INTEGRATOR_EBI_WRITE_ENABLE; tmp = readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) |
writel(tmp, EBI_CSR1); INTEGRATOR_EBI_WRITE_ENABLE;
writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET);
if (!(readl(EBI_CSR1) & INTEGRATOR_EBI_WRITE_ENABLE)) { if (!(readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET)
writel(0xa05f, EBI_LOCK); & INTEGRATOR_EBI_WRITE_ENABLE)) {
writel(tmp, EBI_CSR1); writel(0xa05f, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET);
writel(0, EBI_LOCK); writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET);
writel(0, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET);
} }
return 0; return 0;
} }
...@@ -202,13 +190,15 @@ static void ap_flash_exit(struct platform_device *dev) ...@@ -202,13 +190,15 @@ static void ap_flash_exit(struct platform_device *dev)
writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP,
ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET);
tmp = readl(EBI_CSR1) & ~INTEGRATOR_EBI_WRITE_ENABLE; tmp = readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) &
writel(tmp, EBI_CSR1); ~INTEGRATOR_EBI_WRITE_ENABLE;
writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET);
if (readl(EBI_CSR1) & INTEGRATOR_EBI_WRITE_ENABLE) { if (readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) &
writel(0xa05f, EBI_LOCK); INTEGRATOR_EBI_WRITE_ENABLE) {
writel(tmp, EBI_CSR1); writel(0xa05f, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET);
writel(0, EBI_LOCK); writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET);
writel(0, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET);
} }
} }
...@@ -475,11 +465,17 @@ static const struct of_device_id ap_syscon_match[] = { ...@@ -475,11 +465,17 @@ static const struct of_device_id ap_syscon_match[] = {
{ }, { },
}; };
static const struct of_device_id ebi_match[] = {
{ .compatible = "arm,external-bus-interface"},
{ },
};
static void __init ap_init_of(void) static void __init ap_init_of(void)
{ {
unsigned long sc_dec; unsigned long sc_dec;
struct device_node *root; struct device_node *root;
struct device_node *syscon; struct device_node *syscon;
struct device_node *ebi;
struct device *parent; struct device *parent;
struct soc_device *soc_dev; struct soc_device *soc_dev;
struct soc_device_attribute *soc_dev_attr; struct soc_device_attribute *soc_dev_attr;
...@@ -495,10 +491,16 @@ static void __init ap_init_of(void) ...@@ -495,10 +491,16 @@ static void __init ap_init_of(void)
syscon = of_find_matching_node(root, ap_syscon_match); syscon = of_find_matching_node(root, ap_syscon_match);
if (!syscon) if (!syscon)
return; return;
ebi = of_find_matching_node(root, ebi_match);
if (!ebi)
return;
ap_syscon_base = of_iomap(syscon, 0); ap_syscon_base = of_iomap(syscon, 0);
if (!ap_syscon_base) if (!ap_syscon_base)
return; return;
ebi_base = of_iomap(ebi, 0);
if (!ebi_base)
return;
ap_sc_id = readl(ap_syscon_base); ap_sc_id = readl(ap_syscon_base);
......
...@@ -64,9 +64,6 @@ static void __iomem *intcp_con_base; ...@@ -64,9 +64,6 @@ static void __iomem *intcp_con_base;
/* /*
* Logical Physical * Logical Physical
* f1000000 10000000 Core module registers
* f1100000 11000000 System controller registers
* f1200000 12000000 EBI registers
* f1300000 13000000 Counter/Timer * f1300000 13000000 Counter/Timer
* f1400000 14000000 Interrupt controller * f1400000 14000000 Interrupt controller
* f1600000 16000000 UART 0 * f1600000 16000000 UART 0
...@@ -74,21 +71,10 @@ static void __iomem *intcp_con_base; ...@@ -74,21 +71,10 @@ static void __iomem *intcp_con_base;
* f1a00000 1a000000 Debug LEDs * f1a00000 1a000000 Debug LEDs
* fc900000 c9000000 GPIO * fc900000 c9000000 GPIO
* fca00000 ca000000 SIC * fca00000 ca000000 SIC
* fcb00000 cb000000 CP system control
*/ */
static struct map_desc intcp_io_desc[] __initdata __maybe_unused = { static struct map_desc intcp_io_desc[] __initdata __maybe_unused = {
{ {
.virtual = IO_ADDRESS(INTEGRATOR_HDR_BASE),
.pfn = __phys_to_pfn(INTEGRATOR_HDR_BASE),
.length = SZ_4K,
.type = MT_DEVICE
}, {
.virtual = IO_ADDRESS(INTEGRATOR_EBI_BASE),
.pfn = __phys_to_pfn(INTEGRATOR_EBI_BASE),
.length = SZ_4K,
.type = MT_DEVICE
}, {
.virtual = IO_ADDRESS(INTEGRATOR_CT_BASE), .virtual = IO_ADDRESS(INTEGRATOR_CT_BASE),
.pfn = __phys_to_pfn(INTEGRATOR_CT_BASE), .pfn = __phys_to_pfn(INTEGRATOR_CT_BASE),
.length = SZ_4K, .length = SZ_4K,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment