Subject: [FYI] cell: hack around broken firmware command line Some firmware versions on cell don't allow setting the kernel command line via nvram and the firmware user interface to set it is not officially supported. If we encounter the broken command line, we change it to the values that we expect to be correct and warn the user that they should upgrade the firmware. This patch is not for inclusion in an official kernel but only provided for information purposes. Signed-off-by: Arnd Bergmann --- Index: linux-2.6/arch/powerpc/platforms/cell/setup.c =================================================================== --- linux-2.6.orig/arch/powerpc/platforms/cell/setup.c +++ linux-2.6/arch/powerpc/platforms/cell/setup.c @@ -95,12 +95,43 @@ static void __init cell_init_irq(void) spider_init_IRQ(); } +static void fixup_cmdline(char *cmd) +{ + char *c; + int fixup = 0; + c = strstr(cmd, "console=rtas0"); + if (c) { + strncpy (c, "console=hvc0 ", 13); + printk(KERN_WARNING "WARNING: outdated console setting: " + "rtas0, use hvc0 instead\n"); + fixup = 1; + } + c = strstr(cmd, "console=bogus0"); + if (c) { + strncpy (c, "console=hvc0 ", 14); + printk(KERN_WARNING "WARNING: outdated console setting: " + "bogus0, use hvc0 instead\n"); + fixup = 1; + } + c = strstr(cmd, "root=/dev/hde"); + if (c) { + strncpy (c, "root=/dev/hda", 13); + printk(KERN_WARNING "WARNING: outdated root dev setting: " + "use 'hda' instead of 'hde'\n"); + fixup = 1; + } + + WARN_ON(fixup); +} + static void __init cell_setup_arch(void) { #ifdef CONFIG_SPU_BASE spu_priv1_ops = &spu_priv1_mmio_ops; #endif + fixup_cmdline(cmd_line); + cbe_regs_init(); #ifdef CONFIG_CBE_RAS Index: linux-2.6/drivers/ide/pci/aec62xx.c =================================================================== --- linux-2.6.orig/drivers/ide/pci/aec62xx.c +++ linux-2.6/drivers/ide/pci/aec62xx.c @@ -367,7 +367,7 @@ static ide_pci_device_t aec62xx_chipsets .channels = 2, .autodma = AUTODMA, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, - .bootable = OFF_BOARD, + .bootable = ON_BOARD, },{ /* 1 */ .name = "AEC6260", .init_setup = init_setup_aec62xx, @@ -376,7 +376,7 @@ static ide_pci_device_t aec62xx_chipsets .init_dma = init_dma_aec62xx, .channels = 2, .autodma = NOAUTODMA, - .bootable = OFF_BOARD, + .bootable = ON_BOARD, },{ /* 2 */ .name = "AEC6260R", .init_setup = init_setup_aec62xx, @@ -395,7 +395,7 @@ static ide_pci_device_t aec62xx_chipsets .init_dma = init_dma_aec62xx, .channels = 2, .autodma = AUTODMA, - .bootable = OFF_BOARD, + .bootable = ON_BOARD, },{ /* 4 */ .name = "AEC6X80R", .init_setup = init_setup_aec6x80, @@ -405,7 +405,7 @@ static ide_pci_device_t aec62xx_chipsets .channels = 2, .autodma = AUTODMA, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, - .bootable = OFF_BOARD, + .bootable = ON_BOARD, } };