mirror of
https://github.com/torvalds/linux.git
synced 2024-12-24 11:51:27 +00:00
orion cleanup for v3.8
- remove unused includes in kirkwood - fix sparse warnings in kirkwood - checkpatch cleanup in kirkwood - use common code in pcie on kirkwood -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQEcBAABAgAGBQJQrbKoAAoJEAi3KVZQDZAeojYH/0m7nrIMrLQ1A9FjglAzZQrE Q7UrP4HWlTnG+aNF4a0G4CpO+vZYJd6mSKW3kP18AuncCK5hylAPdHyGRWT+RLQg BCKVib2S/Gxqh3Qc9Re6vReKN5icyzYkB0Sv6/kpBLqfx3f7d1WJPUyA+RsCQhBn crp7rYOBK3vcmRjgrrzCkyNzsTHt6pCfQio3uCru34gCCHZpellZLGzMScVpuQqM LO9WVJTBe1RSRXej+StutcPR/5sy7yjKrA2y42tAmqKTPgzCdcXsbc2BqQRNZ4X2 UzXAYOMLr2BK43t68DBaX2QGy4AxWqgCqCKpoWwjBEtAD5mh/X+NAbs7kyUov3c= =JCyB -----END PGP SIGNATURE----- Merge tag 'orion_cleanup_for_3.8' of git://git.infradead.org/users/jcooper/linux into next/cleanup From Jason Cooper: orion cleanup for v3.8 - remove unused includes in kirkwood - fix sparse warnings in kirkwood - checkpatch cleanup in kirkwood - use common code in pcie on kirkwood * tag 'orion_cleanup_for_3.8' of git://git.infradead.org/users/jcooper/linux: ARM: Kirkwood: Use hw_pci.ops instead of hw_pci.scan ARM: Kirkwood: checkpatch cleanups ARM: Kirkwood: Fix sparse warnings. ARM: Kirkwood: Remove unused includes ARM: kirkwood: cleanup lsxl board includes
This commit is contained in:
commit
d98eb5cfb0
@ -16,21 +16,8 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/ata_platform.h>
|
||||
#include <linux/mv643xx_eth.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <mach/kirkwood.h>
|
||||
#include <mach/bridge-regs.h>
|
||||
#include <linux/platform_data/mmc-mvsdio.h>
|
||||
#include "common.h"
|
||||
#include "mpp.h"
|
||||
|
||||
|
@ -13,23 +13,8 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/ata_platform.h>
|
||||
#include <linux/mv643xx_eth.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/spi/flash.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <mach/kirkwood.h>
|
||||
#include <mach/bridge-regs.h>
|
||||
#include <linux/platform_data/mmc-mvsdio.h>
|
||||
#include "common.h"
|
||||
#include "mpp.h"
|
||||
|
@ -26,7 +26,7 @@ static struct of_device_id kirkwood_dt_match_table[] __initdata = {
|
||||
{ }
|
||||
};
|
||||
|
||||
struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = {
|
||||
static struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = {
|
||||
OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL),
|
||||
OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0",
|
||||
NULL),
|
||||
@ -98,7 +98,7 @@ static void __init kirkwood_dt_init(void)
|
||||
kirkwood_auxdata_lookup, NULL);
|
||||
}
|
||||
|
||||
static const char *kirkwood_dt_board_compat[] = {
|
||||
static const char * const kirkwood_dt_board_compat[] = {
|
||||
"globalscale,dreamplug",
|
||||
"dlink,dns-320",
|
||||
"dlink,dns-325",
|
||||
|
@ -18,21 +18,8 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/ata_platform.h>
|
||||
#include <linux/mv643xx_eth.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <mach/kirkwood.h>
|
||||
#include <mach/bridge-regs.h>
|
||||
#include <linux/platform_data/mmc-mvsdio.h>
|
||||
#include "common.h"
|
||||
#include "mpp.h"
|
||||
|
||||
|
@ -13,15 +13,9 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/ata_platform.h>
|
||||
#include <linux/mv643xx_eth.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/input.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <mach/kirkwood.h>
|
||||
#include "common.h"
|
||||
#include "mpp.h"
|
||||
|
||||
|
@ -10,16 +10,8 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/mv643xx_eth.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <mach/kirkwood.h>
|
||||
#include "common.h"
|
||||
#include "mpp.h"
|
||||
|
||||
|
@ -10,10 +10,8 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mv643xx_eth.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <mach/kirkwood.h>
|
||||
#include "common.h"
|
||||
#include "mpp.h"
|
||||
|
||||
|
@ -14,17 +14,9 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/ata_platform.h>
|
||||
#include <linux/spi/flash.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/mv643xx_eth.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio-fan.h>
|
||||
#include <linux/input.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <mach/kirkwood.h>
|
||||
#include "common.h"
|
||||
#include "mpp.h"
|
||||
|
||||
|
@ -19,9 +19,6 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mv643xx_eth.h>
|
||||
#include <linux/ata_platform.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/input.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <mach/kirkwood.h>
|
||||
|
@ -18,10 +18,10 @@
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/mv643xx_i2c.h>
|
||||
#include <linux/timex.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <net/dsa.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/timex.h>
|
||||
#include <asm/kexec.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <mach/kirkwood.h>
|
||||
@ -425,7 +425,7 @@ void __init kirkwood_sdio_init(struct mvsdio_platform_data *mvsdio_data)
|
||||
/*****************************************************************************
|
||||
* SPI
|
||||
****************************************************************************/
|
||||
void __init kirkwood_spi_init()
|
||||
void __init kirkwood_spi_init(void)
|
||||
{
|
||||
orion_spi_init(SPI_PHYS_BASE);
|
||||
}
|
||||
@ -646,8 +646,7 @@ void __init kirkwood_l2_init(void)
|
||||
|
||||
void __init kirkwood_init(void)
|
||||
{
|
||||
printk(KERN_INFO "Kirkwood: %s, TCLK=%d.\n",
|
||||
kirkwood_id(), kirkwood_tclk);
|
||||
pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk);
|
||||
|
||||
/*
|
||||
* Disable propagation of mbus errors to the CPU local bus,
|
||||
|
@ -47,7 +47,8 @@ void kirkwood_i2c_init(void);
|
||||
void kirkwood_uart0_init(void);
|
||||
void kirkwood_uart1_init(void);
|
||||
void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay);
|
||||
void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *));
|
||||
void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts,
|
||||
int (*dev_ready)(struct mtd_info *));
|
||||
void kirkwood_audio_init(void);
|
||||
void kirkwood_restart(char, const char *);
|
||||
void kirkwood_clk_init(void);
|
||||
|
@ -64,7 +64,7 @@ static int kirkwood_init_cpuidle(void)
|
||||
|
||||
cpuidle_register_driver(&kirkwood_idle_driver);
|
||||
if (cpuidle_register_device(device)) {
|
||||
printk(KERN_ERR "kirkwood_init_cpuidle: Failed registering\n");
|
||||
pr_err("kirkwood_init_cpuidle: Failed registering\n");
|
||||
return -EIO;
|
||||
}
|
||||
return 0;
|
||||
|
@ -93,7 +93,7 @@ static void __init dockstar_init(void)
|
||||
|
||||
if (gpio_request(29, "USB Power Enable") != 0 ||
|
||||
gpio_direction_output(29, 1) != 0)
|
||||
printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n");
|
||||
pr_err("can't set up GPIO 29 (USB Power Enable)\n");
|
||||
kirkwood_ehci_init();
|
||||
|
||||
kirkwood_ge00_init(&dockstar_ge00_data);
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <mach/bridge-regs.h>
|
||||
#include <plat/orion-gpio.h>
|
||||
#include <plat/irq.h>
|
||||
#include "common.h"
|
||||
|
||||
static int __initdata gpio0_irqs[4] = {
|
||||
IRQ_KIRKWOOD_GPIO_LOW_0_7,
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <mach/irqs.h>
|
||||
#include <plat/time.h>
|
||||
#include "common.h"
|
||||
#include "lacie_v2-common.h"
|
||||
|
||||
/*****************************************************************************
|
||||
* 512KB SPI Flash on Boot Device (MACRONIX MX25L4005)
|
||||
|
@ -30,8 +30,8 @@ static unsigned int __init kirkwood_variant(void)
|
||||
if (dev == MV88F6180_DEV_ID)
|
||||
return MPP_F6180_MASK;
|
||||
|
||||
printk(KERN_ERR "MPP setup: unknown kirkwood variant "
|
||||
"(dev %#x rev %#x)\n", dev, rev);
|
||||
pr_err("MPP setup: unknown kirkwood variant (dev %#x rev %#x)\n",
|
||||
dev, rev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -121,14 +121,12 @@ static int __init uart1_mpp_config(void)
|
||||
kirkwood_mpp_conf(openrd_uart1_mpp_config);
|
||||
|
||||
if (gpio_request(34, "SD_UART1_SEL")) {
|
||||
printk(KERN_ERR "GPIO request failed for SD/UART1 selection"
|
||||
", gpio: 34\n");
|
||||
pr_err("GPIO request 34 failed for SD/UART1 selection\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (gpio_request(28, "RS232_RS485_SEL")) {
|
||||
printk(KERN_ERR "GPIO request failed for RS232/RS485 selection"
|
||||
", gpio# 28\n");
|
||||
pr_err("GPIO request 28 failed for RS232/RS485 selection\n");
|
||||
gpio_free(34);
|
||||
return -EIO;
|
||||
}
|
||||
@ -185,15 +183,13 @@ static void __init openrd_init(void)
|
||||
|
||||
if (uart1 <= 0) {
|
||||
if (uart1 < 0)
|
||||
printk(KERN_ERR "Invalid kernel parameter to select "
|
||||
"UART1. Defaulting to SD. ERROR CODE: %d\n",
|
||||
pr_err("Invalid kernel parameter to select UART1. Defaulting to SD. ERROR CODE: %d\n",
|
||||
uart1);
|
||||
|
||||
/* Select SD
|
||||
* Pin # 34: 0 => UART1, 1 => SD */
|
||||
if (gpio_request(34, "SD_UART1_SEL")) {
|
||||
printk(KERN_ERR "GPIO request failed for SD/UART1 "
|
||||
"selection, gpio: 34\n");
|
||||
pr_err("GPIO request 34 failed for SD/UART1 selection\n");
|
||||
} else {
|
||||
|
||||
gpio_direction_output(34, 1);
|
||||
|
@ -26,7 +26,7 @@ static void kirkwood_enable_pcie_clk(const char *port)
|
||||
|
||||
clk = clk_get_sys("pcie", port);
|
||||
if (IS_ERR(clk)) {
|
||||
printk(KERN_ERR "PCIE clock %s missing\n", port);
|
||||
pr_err("PCIE clock %s missing\n", port);
|
||||
return;
|
||||
}
|
||||
clk_prepare_enable(clk);
|
||||
@ -168,7 +168,7 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys)
|
||||
return 0;
|
||||
|
||||
index = pcie_port_map[nr];
|
||||
printk(KERN_INFO "PCI: bus%d uses PCIe port %d\n", sys->busnr, index);
|
||||
pr_info("PCI: bus%d uses PCIe port %d\n", sys->busnr, index);
|
||||
|
||||
pp = kzalloc(sizeof(*pp), GFP_KERNEL);
|
||||
if (!pp)
|
||||
@ -186,7 +186,8 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys)
|
||||
case 1:
|
||||
kirkwood_enable_pcie_clk("1");
|
||||
pcie1_ioresources_init(pp);
|
||||
pci_ioremap_io(SZ_64K * sys->busnr, KIRKWOOD_PCIE1_IO_PHYS_BASE);
|
||||
pci_ioremap_io(SZ_64K * sys->busnr,
|
||||
KIRKWOOD_PCIE1_IO_PHYS_BASE);
|
||||
break;
|
||||
default:
|
||||
panic("PCIe setup: invalid controller %d", index);
|
||||
@ -224,22 +225,6 @@ static void __devinit rc_pci_fixup(struct pci_dev *dev)
|
||||
}
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup);
|
||||
|
||||
static struct pci_bus __init *
|
||||
kirkwood_pcie_scan_bus(int nr, struct pci_sys_data *sys)
|
||||
{
|
||||
struct pci_bus *bus;
|
||||
|
||||
if (nr < num_pcie_ports) {
|
||||
bus = pci_scan_root_bus(NULL, sys->busnr, &pcie_ops, sys,
|
||||
&sys->resources);
|
||||
} else {
|
||||
bus = NULL;
|
||||
BUG();
|
||||
}
|
||||
|
||||
return bus;
|
||||
}
|
||||
|
||||
static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot,
|
||||
u8 pin)
|
||||
{
|
||||
@ -251,19 +236,19 @@ static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot,
|
||||
|
||||
static struct hw_pci kirkwood_pci __initdata = {
|
||||
.setup = kirkwood_pcie_setup,
|
||||
.scan = kirkwood_pcie_scan_bus,
|
||||
.map_irq = kirkwood_pcie_map_irq,
|
||||
.ops = &pcie_ops,
|
||||
};
|
||||
|
||||
static void __init add_pcie_port(int index, void __iomem *base)
|
||||
{
|
||||
printk(KERN_INFO "Kirkwood PCIe port %d: ", index);
|
||||
pr_info("Kirkwood PCIe port %d: ", index);
|
||||
|
||||
if (orion_pcie_link_up(base)) {
|
||||
printk(KERN_INFO "link up\n");
|
||||
pr_info("link up\n");
|
||||
pcie_port_map[num_pcie_ports++] = index;
|
||||
} else
|
||||
printk(KERN_INFO "link down, ignoring\n");
|
||||
pr_info("link down, ignoring\n");
|
||||
}
|
||||
|
||||
void __init kirkwood_pcie_init(unsigned int portmask)
|
||||
|
@ -117,7 +117,7 @@ static void __init sheevaplug_init(void)
|
||||
|
||||
if (gpio_request(29, "USB Power Enable") != 0 ||
|
||||
gpio_direction_output(29, 1) != 0)
|
||||
printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n");
|
||||
pr_err("can't set up GPIO 29 (USB Power Enable)\n");
|
||||
kirkwood_ehci_init();
|
||||
|
||||
kirkwood_ge00_init(&sheevaplug_ge00_data);
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "common.h"
|
||||
#include "mpp.h"
|
||||
|
||||
struct mtd_partition hp_t5325_partitions[] = {
|
||||
static struct mtd_partition hp_t5325_partitions[] = {
|
||||
{
|
||||
.name = "u-boot env",
|
||||
.size = SZ_64K,
|
||||
@ -59,14 +59,14 @@ struct mtd_partition hp_t5325_partitions[] = {
|
||||
},
|
||||
};
|
||||
|
||||
const struct flash_platform_data hp_t5325_flash = {
|
||||
static const struct flash_platform_data hp_t5325_flash = {
|
||||
.type = "mx25l8005",
|
||||
.name = "spi_flash",
|
||||
.parts = hp_t5325_partitions,
|
||||
.nr_parts = ARRAY_SIZE(hp_t5325_partitions),
|
||||
};
|
||||
|
||||
struct spi_board_info __initdata hp_t5325_spi_slave_info[] = {
|
||||
static struct spi_board_info __initdata hp_t5325_spi_slave_info[] = {
|
||||
{
|
||||
.modalias = "m25p80",
|
||||
.platform_data = &hp_t5325_flash,
|
||||
|
@ -170,7 +170,6 @@ static int __init ts41x_pci_init(void)
|
||||
else
|
||||
kirkwood_pcie_init(KW_PCIE0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
subsys_initcall(ts41x_pci_init);
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <linux/serial_reg.h>
|
||||
#include <mach/kirkwood.h>
|
||||
#include "common.h"
|
||||
#include "tsx1x-common.h"
|
||||
|
||||
/*
|
||||
* QNAP TS-x1x Boards flash
|
||||
@ -29,7 +30,7 @@
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
struct mtd_partition qnap_tsx1x_partitions[] = {
|
||||
static struct mtd_partition qnap_tsx1x_partitions[] = {
|
||||
{
|
||||
.name = "U-Boot",
|
||||
.size = 0x00080000,
|
||||
@ -58,14 +59,14 @@ struct mtd_partition qnap_tsx1x_partitions[] = {
|
||||
},
|
||||
};
|
||||
|
||||
const struct flash_platform_data qnap_tsx1x_flash = {
|
||||
static const struct flash_platform_data qnap_tsx1x_flash = {
|
||||
.type = "m25p128",
|
||||
.name = "spi_flash",
|
||||
.parts = qnap_tsx1x_partitions,
|
||||
.nr_parts = ARRAY_SIZE(qnap_tsx1x_partitions),
|
||||
};
|
||||
|
||||
struct spi_board_info __initdata qnap_tsx1x_spi_slave_info[] = {
|
||||
static struct spi_board_info __initdata qnap_tsx1x_spi_slave_info[] = {
|
||||
{
|
||||
.modalias = "m25p80",
|
||||
.platform_data = &qnap_tsx1x_flash,
|
||||
|
Loading…
Reference in New Issue
Block a user