aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-25 15:52:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-25 15:52:16 -0400
commitb9fa38f75ea7e1f64bc29653ca9758303ce698e4 (patch)
tree6f6c0232ccbd9c27c923cf5cdcb0a3948e061aa9 /drivers/serial
parent6e18933f2b6156d0a0ec9d5522ab6a6033cf7241 (diff)
parentf360bf0015e5b3e82be61c68e0863b3f98852ee2 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (49 commits) [POWERPC] Add zImage.iseries to arch/powerpc/boot/.gitignore [POWERPC] bootwrapper: fix build error on virtex405-head.S [POWERPC] 4xx: Fix 460GT support to not enable FPU [POWERPC] 4xx: Add NOR FLASH entries to Canyonlands and Glacier dts [POWERPC] Xilinx: of_serial support for Xilinx uart 16550. [POWERPC] Xilinx: boot support for Xilinx uart 16550. [POWERPC] celleb: Add support for PCI Express [POWERPC] celleb: Move miscellaneous files for Beat [POWERPC] celleb: Move a file for SPU on Beat [POWERPC] celleb: Move files for Beat mmu and iommu [POWERPC] celleb: Move files for Beat hvcall interfaces [POWERPC] celleb: Move the SCC related code for celleb [POWERPC] celleb: Move the files for celleb base support [POWERPC] celleb: Consolidate io-workarounds code [POWERPC] cell: Generalize io-workarounds code [POWERPC] Add CONFIG_PPC_PSERIES_DEBUG to enable debugging for platforms/pseries [POWERPC] Convert from DBG() to pr_debug() in platforms/pseries/ [POWERPC] Register udbg console early on pseries LPAR [POWERPC] Mark udbg console as CON_ANYTIME, ie. callable early in boot [POWERPC] Set udbg_console index to 0 ...
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/of_serial.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c
index 8aacfb78deab..25029c7570b6 100644
--- a/drivers/serial/of_serial.c
+++ b/drivers/serial/of_serial.c
@@ -31,7 +31,8 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev,
31 struct resource resource; 31 struct resource resource;
32 struct device_node *np = ofdev->node; 32 struct device_node *np = ofdev->node;
33 const unsigned int *clk, *spd; 33 const unsigned int *clk, *spd;
34 int ret; 34 const u32 *prop;
35 int ret, prop_size;
35 36
36 memset(port, 0, sizeof *port); 37 memset(port, 0, sizeof *port);
37 spd = of_get_property(np, "current-speed", NULL); 38 spd = of_get_property(np, "current-speed", NULL);
@@ -49,6 +50,17 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev,
49 50
50 spin_lock_init(&port->lock); 51 spin_lock_init(&port->lock);
51 port->mapbase = resource.start; 52 port->mapbase = resource.start;
53
54 /* Check for shifted address mapping */
55 prop = of_get_property(np, "reg-offset", &prop_size);
56 if (prop && (prop_size == sizeof(u32)))
57 port->mapbase += *prop;
58
59 /* Check for registers offset within the devices address range */
60 prop = of_get_property(np, "reg-shift", &prop_size);
61 if (prop && (prop_size == sizeof(u32)))
62 port->regshift = *prop;
63
52 port->irq = irq_of_parse_and_map(np, 0); 64 port->irq = irq_of_parse_and_map(np, 0);
53 port->iotype = UPIO_MEM; 65 port->iotype = UPIO_MEM;
54 port->type = type; 66 port->type = type;