diff options
| -rw-r--r-- | Documentation/ABI/testing/sysfs-bus-bcma | 31 | ||||
| -rw-r--r-- | MAINTAINERS | 7 | ||||
| -rw-r--r-- | drivers/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/Makefile | 1 | ||||
| -rw-r--r-- | drivers/bcma/Kconfig | 33 | ||||
| -rw-r--r-- | drivers/bcma/Makefile | 7 | ||||
| -rw-r--r-- | drivers/bcma/README | 19 | ||||
| -rw-r--r-- | drivers/bcma/TODO | 3 | ||||
| -rw-r--r-- | drivers/bcma/bcma_private.h | 28 | ||||
| -rw-r--r-- | drivers/bcma/core.c | 51 | ||||
| -rw-r--r-- | drivers/bcma/driver_chipcommon.c | 87 | ||||
| -rw-r--r-- | drivers/bcma/driver_chipcommon_pmu.c | 134 | ||||
| -rw-r--r-- | drivers/bcma/driver_pci.c | 163 | ||||
| -rw-r--r-- | drivers/bcma/host_pci.c | 196 | ||||
| -rw-r--r-- | drivers/bcma/main.c | 247 | ||||
| -rw-r--r-- | drivers/bcma/scan.c | 360 | ||||
| -rw-r--r-- | drivers/bcma/scan.h | 56 | ||||
| -rw-r--r-- | include/linux/bcma/bcma.h | 224 | ||||
| -rw-r--r-- | include/linux/bcma/bcma_driver_chipcommon.h | 297 | ||||
| -rw-r--r-- | include/linux/bcma/bcma_driver_pci.h | 89 | ||||
| -rw-r--r-- | include/linux/bcma/bcma_regs.h | 34 | ||||
| -rw-r--r-- | include/linux/mod_devicetable.h | 17 | ||||
| -rw-r--r-- | scripts/mod/file2alias.c | 22 |
23 files changed, 2108 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-bcma b/Documentation/ABI/testing/sysfs-bus-bcma new file mode 100644 index 000000000000..06b62badddd1 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-bcma | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | What: /sys/bus/bcma/devices/.../manuf | ||
| 2 | Date: May 2011 | ||
| 3 | KernelVersion: 2.6.40 | ||
| 4 | Contact: Rafał Miłecki <zajec5@gmail.com> | ||
| 5 | Description: | ||
| 6 | Each BCMA core has it's manufacturer id. See | ||
| 7 | include/linux/bcma/bcma.h for possible values. | ||
| 8 | |||
| 9 | What: /sys/bus/bcma/devices/.../id | ||
| 10 | Date: May 2011 | ||
| 11 | KernelVersion: 2.6.40 | ||
| 12 | Contact: Rafał Miłecki <zajec5@gmail.com> | ||
| 13 | Description: | ||
| 14 | There are a few types of BCMA cores, they can be identified by | ||
| 15 | id field. | ||
| 16 | |||
| 17 | What: /sys/bus/bcma/devices/.../rev | ||
| 18 | Date: May 2011 | ||
| 19 | KernelVersion: 2.6.40 | ||
| 20 | Contact: Rafał Miłecki <zajec5@gmail.com> | ||
| 21 | Description: | ||
| 22 | BCMA cores of the same type can still slightly differ depending | ||
| 23 | on their revision. Use it for detailed programming. | ||
| 24 | |||
| 25 | What: /sys/bus/bcma/devices/.../class | ||
| 26 | Date: May 2011 | ||
| 27 | KernelVersion: 2.6.40 | ||
| 28 | Contact: Rafał Miłecki <zajec5@gmail.com> | ||
| 29 | Description: | ||
| 30 | Each BCMA core is identified by few fields, including class it | ||
| 31 | belongs to. See include/linux/bcma/bcma.h for possible values. | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 9f9104987a73..df5585819a62 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -5810,6 +5810,13 @@ S: Maintained | |||
| 5810 | F: drivers/ssb/ | 5810 | F: drivers/ssb/ |
| 5811 | F: include/linux/ssb/ | 5811 | F: include/linux/ssb/ |
| 5812 | 5812 | ||
| 5813 | BROADCOM SPECIFIC AMBA DRIVER (BCMA) | ||
| 5814 | M: Rafał Miłecki <zajec5@gmail.com> | ||
| 5815 | L: linux-wireless@vger.kernel.org | ||
| 5816 | S: Maintained | ||
| 5817 | F: drivers/bcma/ | ||
| 5818 | F: include/linux/bcma/ | ||
| 5819 | |||
| 5813 | SONY VAIO CONTROL DEVICE DRIVER | 5820 | SONY VAIO CONTROL DEVICE DRIVER |
| 5814 | M: Mattia Dongili <malattia@linux.it> | 5821 | M: Mattia Dongili <malattia@linux.it> |
| 5815 | L: platform-driver-x86@vger.kernel.org | 5822 | L: platform-driver-x86@vger.kernel.org |
diff --git a/drivers/Kconfig b/drivers/Kconfig index 177c7d156933..aca706751469 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig | |||
| @@ -68,6 +68,8 @@ source "drivers/watchdog/Kconfig" | |||
| 68 | 68 | ||
| 69 | source "drivers/ssb/Kconfig" | 69 | source "drivers/ssb/Kconfig" |
| 70 | 70 | ||
| 71 | source "drivers/bcma/Kconfig" | ||
| 72 | |||
| 71 | source "drivers/mfd/Kconfig" | 73 | source "drivers/mfd/Kconfig" |
| 72 | 74 | ||
| 73 | source "drivers/regulator/Kconfig" | 75 | source "drivers/regulator/Kconfig" |
diff --git a/drivers/Makefile b/drivers/Makefile index 3f135b6fb014..a29527f4ded6 100644 --- a/drivers/Makefile +++ b/drivers/Makefile | |||
| @@ -110,6 +110,7 @@ obj-$(CONFIG_HID) += hid/ | |||
| 110 | obj-$(CONFIG_PPC_PS3) += ps3/ | 110 | obj-$(CONFIG_PPC_PS3) += ps3/ |
| 111 | obj-$(CONFIG_OF) += of/ | 111 | obj-$(CONFIG_OF) += of/ |
| 112 | obj-$(CONFIG_SSB) += ssb/ | 112 | obj-$(CONFIG_SSB) += ssb/ |
| 113 | obj-$(CONFIG_BCMA) += bcma/ | ||
| 113 | obj-$(CONFIG_VHOST_NET) += vhost/ | 114 | obj-$(CONFIG_VHOST_NET) += vhost/ |
| 114 | obj-$(CONFIG_VLYNQ) += vlynq/ | 115 | obj-$(CONFIG_VLYNQ) += vlynq/ |
| 115 | obj-$(CONFIG_STAGING) += staging/ | 116 | obj-$(CONFIG_STAGING) += staging/ |
diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig new file mode 100644 index 000000000000..353781b5b78b --- /dev/null +++ b/drivers/bcma/Kconfig | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | config BCMA_POSSIBLE | ||
| 2 | bool | ||
| 3 | depends on HAS_IOMEM && HAS_DMA | ||
| 4 | default y | ||
| 5 | |||
| 6 | menu "Broadcom specific AMBA" | ||
| 7 | depends on BCMA_POSSIBLE | ||
| 8 | |||
| 9 | config BCMA | ||
| 10 | tristate "BCMA support" | ||
| 11 | depends on BCMA_POSSIBLE | ||
| 12 | help | ||
| 13 | Bus driver for Broadcom specific Advanced Microcontroller Bus | ||
| 14 | Architecture. | ||
| 15 | |||
| 16 | config BCMA_HOST_PCI_POSSIBLE | ||
| 17 | bool | ||
| 18 | depends on BCMA && PCI = y | ||
| 19 | default y | ||
| 20 | |||
| 21 | config BCMA_HOST_PCI | ||
| 22 | bool "Support for BCMA on PCI-host bus" | ||
| 23 | depends on BCMA_HOST_PCI_POSSIBLE | ||
| 24 | |||
| 25 | config BCMA_DEBUG | ||
| 26 | bool "BCMA debugging" | ||
| 27 | depends on BCMA | ||
| 28 | help | ||
| 29 | This turns on additional debugging messages. | ||
| 30 | |||
| 31 | If unsure, say N | ||
| 32 | |||
| 33 | endmenu | ||
diff --git a/drivers/bcma/Makefile b/drivers/bcma/Makefile new file mode 100644 index 000000000000..0d56245bcb79 --- /dev/null +++ b/drivers/bcma/Makefile | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | bcma-y += main.o scan.o core.o | ||
| 2 | bcma-y += driver_chipcommon.o driver_chipcommon_pmu.o | ||
| 3 | bcma-y += driver_pci.o | ||
| 4 | bcma-$(CONFIG_BCMA_HOST_PCI) += host_pci.o | ||
| 5 | obj-$(CONFIG_BCMA) += bcma.o | ||
| 6 | |||
| 7 | ccflags-$(CONFIG_BCMA_DEBUG) := -DDEBUG | ||
diff --git a/drivers/bcma/README b/drivers/bcma/README new file mode 100644 index 000000000000..f7e7ce46c603 --- /dev/null +++ b/drivers/bcma/README | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | Broadcom introduced new bus as replacement for older SSB. It is based on AMBA, | ||
| 2 | however from programming point of view there is nothing AMBA specific we use. | ||
| 3 | |||
| 4 | Standard AMBA drivers are platform specific, have hardcoded addresses and use | ||
| 5 | AMBA standard fields like CID and PID. | ||
| 6 | |||
| 7 | In case of Broadcom's cards every device consists of: | ||
| 8 | 1) Broadcom specific AMBA device. It is put on AMBA bus, but can not be treated | ||
| 9 | as standard AMBA device. Reading it's CID or PID can cause machine lockup. | ||
| 10 | 2) AMBA standard devices called ports or wrappers. They have CIDs (AMBA_CID) | ||
| 11 | and PIDs (0x103BB369), but we do not use that info for anything. One of that | ||
| 12 | devices is used for managing Broadcom specific core. | ||
| 13 | |||
| 14 | Addresses of AMBA devices are not hardcoded in driver and have to be read from | ||
| 15 | EPROM. | ||
| 16 | |||
| 17 | In this situation we decided to introduce separated bus. It can contain up to | ||
| 18 | 16 devices identified by Broadcom specific fields: manufacturer, id, revision | ||
| 19 | and class. | ||
diff --git a/drivers/bcma/TODO b/drivers/bcma/TODO new file mode 100644 index 000000000000..da7aa99fe81c --- /dev/null +++ b/drivers/bcma/TODO | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | - Interrupts | ||
| 2 | - Defines for PCI core driver | ||
| 3 | - Create kernel Documentation (use info from README) | ||
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h new file mode 100644 index 000000000000..2f72e9c585fd --- /dev/null +++ b/drivers/bcma/bcma_private.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #ifndef LINUX_BCMA_PRIVATE_H_ | ||
| 2 | #define LINUX_BCMA_PRIVATE_H_ | ||
| 3 | |||
| 4 | #ifndef pr_fmt | ||
| 5 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 6 | #endif | ||
| 7 | |||
| 8 | #include <linux/bcma/bcma.h> | ||
| 9 | #include <linux/delay.h> | ||
| 10 | |||
| 11 | #define BCMA_CORE_SIZE 0x1000 | ||
| 12 | |||
| 13 | struct bcma_bus; | ||
| 14 | |||
| 15 | /* main.c */ | ||
| 16 | extern int bcma_bus_register(struct bcma_bus *bus); | ||
| 17 | extern void bcma_bus_unregister(struct bcma_bus *bus); | ||
| 18 | |||
| 19 | /* scan.c */ | ||
| 20 | int bcma_bus_scan(struct bcma_bus *bus); | ||
| 21 | |||
| 22 | #ifdef CONFIG_BCMA_HOST_PCI | ||
| 23 | /* host_pci.c */ | ||
| 24 | extern int __init bcma_host_pci_init(void); | ||
