12 #include <linux/stddef.h>
13 #include <linux/kernel.h>
15 #include <linux/stat.h>
16 #include <linux/pci.h>
19 #include <asm/pci-bridge.h>
21 #define PCI_HEADER_TYPE_INVALID 0x7f
25 #define MV64X60_VAL_LEN_MAX 11
26 #define MV64X60_PCICFG_CPCI_HOTSWAP 0x68
30 loff_t off,
size_t count)
37 if (count < MV64X60_VAL_LEN_MAX)
43 pci_read_config_dword(phb, MV64X60_PCICFG_CPCI_HOTSWAP, &v);
46 return sprintf(buf,
"0x%08x\n", v);
51 loff_t off,
size_t count)
61 if (
sscanf(buf,
"%i", &v) != 1)
67 pci_write_config_dword(phb, MV64X60_PCICFG_CPCI_HOTSWAP, v);
78 .size = MV64X60_VAL_LEN_MAX,
79 .read = mv64x60_hs_reg_read,
80 .write = mv64x60_hs_reg_write,
83 static int __init mv64x60_sysfs_init(
void)
87 const unsigned int *prop;
96 pdev = platform_device_register_simple(
"marvell,mv64360", 0,
NULL, 0);
116 mv64x60_pci_fixup_early);
118 mv64x60_pci_fixup_early);
125 const int *bus_range;
128 memset(&rsrc, 0,
sizeof(rsrc));
138 if (bus_range ==
NULL || len < 2 *
sizeof(
int))
147 hose->
last_busno = bus_range ? bus_range[1] : 0xff;
153 "Firmware bus number: %d->%d\n",
169 for_each_compatible_node(np,
"pci",
"marvell,mv64360-pci")
170 mv64x60_add_bridge(np);