aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-02 21:45:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-02 21:45:29 -0400
commit79ff1ad2eec1c106962241f6346958b9641e34f3 (patch)
treeec54059a4e9939c0d842ab7fdc77e324ed8fa0f6 /arch
parent821b03ffac8851d6bc1d5530183d2ed25adae35d (diff)
parent781c74b1e660d045c2e380b4ada02534f415685c (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: powerpc/mpc5200: Fix lite5200b suspend/resume powerpc/legacy_serial: Bail if reg-offset/shift properties are present powerpc/bootwrapper: update for initrd with simpleImage
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/boot/Makefile3
-rw-r--r--arch/powerpc/kernel/legacy_serial.c5
-rw-r--r--arch/powerpc/platforms/52xx/lite5200_pm.c14
3 files changed, 20 insertions, 2 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 1cee2f9fdf06..095e04db1c0e 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -273,7 +273,8 @@ endif
273initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-)) 273initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-))
274initrd-y := $(patsubst zImage%, zImage.initrd%, \ 274initrd-y := $(patsubst zImage%, zImage.initrd%, \
275 $(patsubst dtbImage%, dtbImage.initrd%, \ 275 $(patsubst dtbImage%, dtbImage.initrd%, \
276 $(patsubst treeImage%, treeImage.initrd%, $(image-y)))) 276 $(patsubst simpleImage%, simpleImage.initrd%, \
277 $(patsubst treeImage%, treeImage.initrd%, $(image-y)))))
277initrd-y := $(filter-out $(image-y), $(initrd-y)) 278initrd-y := $(filter-out $(image-y), $(initrd-y))
278targets += $(image-y) $(initrd-y) 279targets += $(image-y) $(initrd-y)
279 280
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 61dd17449ddc..cf37f5ca4b71 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -136,6 +136,11 @@ static int __init add_legacy_soc_port(struct device_node *np,
136 if (of_get_property(np, "clock-frequency", NULL) == NULL) 136 if (of_get_property(np, "clock-frequency", NULL) == NULL)
137 return -1; 137 return -1;
138 138
139 /* if reg-shift or offset, don't try to use it */
140 if ((of_get_property(np, "reg-shift", NULL) != NULL) ||
141 (of_get_property(np, "reg-offset", NULL) != NULL))
142 return -1;
143
139 /* if rtas uses this device, don't try to use it as well */ 144 /* if rtas uses this device, don't try to use it as well */
140 if (of_get_property(np, "used-by-rtas", NULL) != NULL) 145 if (of_get_property(np, "used-by-rtas", NULL) != NULL)
141 return -1; 146 return -1;
diff --git a/arch/powerpc/platforms/52xx/lite5200_pm.c b/arch/powerpc/platforms/52xx/lite5200_pm.c
index 41c7fd91e99e..fe92e65103ed 100644
--- a/arch/powerpc/platforms/52xx/lite5200_pm.c
+++ b/arch/powerpc/platforms/52xx/lite5200_pm.c
@@ -14,6 +14,7 @@ static struct mpc52xx_sdma __iomem *bes;
14static struct mpc52xx_xlb __iomem *xlb; 14static struct mpc52xx_xlb __iomem *xlb;
15static struct mpc52xx_gpio __iomem *gps; 15static struct mpc52xx_gpio __iomem *gps;
16static struct mpc52xx_gpio_wkup __iomem *gpw; 16static struct mpc52xx_gpio_wkup __iomem *gpw;
17static void __iomem *pci;
17static void __iomem *sram; 18static void __iomem *sram;
18static const int sram_size = 0x4000; /* 16 kBytes */ 19static const int sram_size = 0x4000; /* 16 kBytes */
19static void __iomem *mbar; 20static void __iomem *mbar;
@@ -50,6 +51,8 @@ static int lite5200_pm_prepare(void)
50 { .type = "builtin", .compatible = "mpc5200", }, /* efika */ 51 { .type = "builtin", .compatible = "mpc5200", }, /* efika */
51 {} 52 {}
52 }; 53 };
54 u64 regaddr64 = 0;
55 const u32 *regaddr_p;
53 56
54 /* deep sleep? let mpc52xx code handle that */ 57 /* deep sleep? let mpc52xx code handle that */
55 if (lite5200_pm_target_state == PM_SUSPEND_STANDBY) 58 if (lite5200_pm_target_state == PM_SUSPEND_STANDBY)
@@ -60,8 +63,12 @@ static int lite5200_pm_prepare(void)
60 63
61 /* map registers */ 64 /* map registers */
62 np = of_find_matching_node(NULL, immr_ids); 65 np = of_find_matching_node(NULL, immr_ids);
63 mbar = of_iomap(np, 0); 66 regaddr_p = of_get_address(np, 0, NULL, NULL);
67 if (regaddr_p)
68 regaddr64 = of_translate_address(np, regaddr_p);
64 of_node_put(np); 69 of_node_put(np);
70
71 mbar = ioremap((u32) regaddr64, 0xC000);
65 if (!mbar) { 72 if (!mbar) {
66 printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__); 73 printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
67 return -ENOSYS; 74 return -ENOSYS;
@@ -71,6 +78,7 @@ static int lite5200_pm_prepare(void)
71 pic = mbar + 0x500; 78 pic = mbar + 0x500;
72 gps = mbar + 0xb00; 79 gps = mbar + 0xb00;
73 gpw = mbar + 0xc00; 80 gpw = mbar + 0xc00;
81 pci = mbar + 0xd00;
74 bes = mbar + 0x1200; 82 bes = mbar + 0x1200;
75 xlb = mbar + 0x1f00; 83 xlb = mbar + 0x1f00;
76 sram = mbar + 0x8000; 84 sram = mbar + 0x8000;
@@ -85,6 +93,7 @@ static struct mpc52xx_sdma sbes;
85static struct mpc52xx_xlb sxlb; 93static struct mpc52xx_xlb sxlb;
86static struct mpc52xx_gpio sgps; 94static struct mpc52xx_gpio sgps;
87static struct mpc52xx_gpio_wkup sgpw; 95static struct mpc52xx_gpio_wkup sgpw;
96static char spci[0x200];
88 97
89static void lite5200_save_regs(void) 98static void lite5200_save_regs(void)
90{ 99{
@@ -94,6 +103,7 @@ static void lite5200_save_regs(void)
94 _memcpy_fromio(&sxlb, xlb, sizeof(*xlb)); 103 _memcpy_fromio(&sxlb, xlb, sizeof(*xlb));
95 _memcpy_fromio(&sgps, gps, sizeof(*gps)); 104 _memcpy_fromio(&sgps, gps, sizeof(*gps));
96 _memcpy_fromio(&sgpw, gpw, sizeof(*gpw)); 105 _memcpy_fromio(&sgpw, gpw, sizeof(*gpw));
106 _memcpy_fromio(spci, pci, 0x200);
97 107
98 _memcpy_fromio(saved_sram, sram, sram_size); 108 _memcpy_fromio(saved_sram, sram, sram_size);
99} 109}
@@ -103,6 +113,8 @@ static void lite5200_restore_regs(void)
103 int i; 113 int i;
104 _memcpy_toio(sram, saved_sram, sram_size); 114 _memcpy_toio(sram, saved_sram, sram_size);
105 115
116 /* PCI Configuration */
117 _memcpy_toio(pci, spci, 0x200);
106 118
107 /* 119 /*
108 * GPIOs. Interrupt Master Enable has higher address then other 120 * GPIOs. Interrupt Master Enable has higher address then other