From d89ddf0da8f0a140d4dc2e2dbc594fb278e33db5 Mon Sep 17 00:00:00 2001 From: Daniel Hellstrom Date: Tue, 4 Jan 2011 01:41:34 +0000 Subject: APBUART: added raw AMBA vendor/device number to match against. Signed-off-by: Daniel Hellstrom Signed-off-by: David S. Miller --- drivers/serial/apbuart.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c index cc01c650a14..7160345a184 100644 --- a/drivers/serial/apbuart.c +++ b/drivers/serial/apbuart.c @@ -580,6 +580,9 @@ static struct of_device_id __initdata apbuart_match[] = { { .name = "GAISLER_APBUART", }, + { + .name = "01_00c", + }, {}, }; -- cgit v1.2.3-70-g09d2 From f28f3313aa97dcb46954f90f596d75f8faf4626e Mon Sep 17 00:00:00 2001 From: Daniel Hellstrom Date: Tue, 4 Jan 2011 01:41:35 +0000 Subject: Added support for ampopts in APBUART driver. Used in AMP systems. Signed-off-by: Daniel Hellstrom Signed-off-by: David S. Miller --- drivers/serial/apbuart.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c index 7160345a184..767ce9e396c 100644 --- a/drivers/serial/apbuart.c +++ b/drivers/serial/apbuart.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -573,7 +574,6 @@ static int __devinit apbuart_probe(struct platform_device *op, printk(KERN_INFO "grlib-apbuart at 0x%llx, irq %d\n", (unsigned long long) port->mapbase, port->irq); return 0; - } static struct of_device_id __initdata apbuart_match[] = { @@ -623,9 +623,12 @@ static void grlib_apbuart_configure(void) int *vendor = (int *) of_get_property(np, "vendor", NULL); int *device = (int *) of_get_property(np, "device", NULL); int *irqs = (int *) of_get_property(np, "interrupts", NULL); + int *ampopts = (int *) of_get_property(np, "ampopts", NULL); regs = (struct amba_prom_registers *) of_get_property(np, "reg", NULL); + if (ampopts && (*ampopts == 0)) + continue; /* Ignore if used by another OS instance */ if (vendor) v = *vendor; if (device) -- cgit v1.2.3-70-g09d2 From 09798eb9479da3413bdf96e7d22a84d8b21e05e1 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Wed, 5 Jan 2011 13:08:06 -0800 Subject: atyfb: Fix bootup hangs on sparc64. After commit 25edd6946a1d74e5e77813c2324a0908c68bcf9e ("sparc64: Get rid of indirect p1275 PROM call buffer.") we can't pass virtual addresses >4GB to PROM calls. Largely this is never necessary in drivers because we have a copy of the entire PROM device tree in the kernel and a set of of_*() interfaces to access it. Unfortunately there were some lingering prom calls in the atyfb driver, in particular prom_finddevice() was being called with an on-stack address which could be anywhere. This code is actually probing for information we already have, the PROM choosen console output device is stored in of_console_device so all of this nasty code consolidates into a one-line comparison. Next we have some prom_getintdefault() calls which are trivially transformed into the equivalent of_getintprop_default(). Special thanks to Fabio, who figured out exactly where the bootup was hanging. That made this bug trivial to fix. Reported-by: Fabio M. Di NItto Reported-by: Sam Ravnborg Reported-by: Frans van Berckel Signed-off-by: David S. Miller Signed-off-by: Fabio M. Di NItto --- drivers/video/aty/atyfb_base.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'drivers') diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 5bf91236c70..5a3ce3ad1ec 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c @@ -2969,10 +2969,8 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, { struct atyfb_par *par = info->par; struct device_node *dp; - char prop[128]; - phandle node; - int len, i, j, ret; u32 mem, chip_id; + int i, j, ret; /* * Map memory-mapped registers. @@ -3088,23 +3086,8 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, aty_st_le32(MEM_CNTL, mem, par); } - /* - * If this is the console device, we will set default video - * settings to what the PROM left us with. - */ - node = prom_getchild(prom_root_node); - node = prom_searchsiblings(node, "aliases"); - if (node) { - len = prom_getproperty(node, "screen", prop, sizeof(prop)); - if (len > 0) { - prop[len] = '\0'; - node = prom_finddevice(prop); - } else - node = 0; - } - dp = pci_device_to_OF_node(pdev); - if (node == dp->phandle) { + if (dp == of_console_device) { struct fb_var_screeninfo *var = &default_var; unsigned int N, P, Q, M, T, R; u32 v_total, h_total; @@ -3112,9 +3095,9 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, u8 pll_regs[16]; u8 clock_cntl; - crtc.vxres = prom_getintdefault(node, "width", 1024); - crtc.vyres = prom_getintdefault(node, "height", 768); - var->bits_per_pixel = prom_getintdefault(node, "depth", 8); + crtc.vxres = of_getintprop_default(dp, "width", 1024); + crtc.vyres = of_getintprop_default(dp, "height", 768); + var->bits_per_pixel = of_getintprop_default(dp, "depth", 8); var->xoffset = var->yoffset = 0; crtc.h_tot_disp = aty_ld_le32(CRTC_H_TOTAL_DISP, par); crtc.h_sync_strt_wid = aty_ld_le32(CRTC_H_SYNC_STRT_WID, par); -- cgit v1.2.3-70-g09d2