platform-device driver for MQ11xx graphics chip
PATCH 1/3 platform-device driver for MQ11xx graphics chip
This patch adds platform_device driver for MQ11xx system-on-chip graphics chip. This chip is used in several non-PCI ARM and MIPS platforms such as the iPAQ H5550. Two subsequent patches add support for the framebuffer and USB gadget subdevices. This patch adds the toplevel driver to drivers/platform because it does not provide any specific functionality (e.g., framebuffer) and it not tied to a named physical bus. In these platforms, the MQ11xx is tied directly to the host bus.
---
commit d1144b4da9a00634c14dfed3a56f8491749b9f01
tree 66014fccdb508b698e326bbf8158d40161a39226
parent 5f367e62a65136321593c193391a186f56f81b93
author <[email protected]> Tue, 02 Aug 2005 11:24:55 -0400 committer <[email protected]> Tue, 02 Aug 2005 11:24:55 -0400
arch/arm/Kconfig | 2 drivers/Kconfig | 2 drivers/Makefile | 2 drivers/platform/.tmp_versions/mq11xx_base.mod | 2 drivers/platform/Kconfig | 23 drivers/platform/Makefile | 5 drivers/platform/mq11xx.h | 925 ++++++++++++++++ drivers/platform/mq11xx_base.c | 1390 ++++++++++++++++++++++++ 8 files changed, 2350 insertions(+), 1 deletions(-)
arch/arm/Kconfig +2 -0
@@ -764,6 +764,8 @@ source "drivers/usb/Kconfig" source "drivers/mmc/Kconfig" +source "drivers/platform/Kconfig" + endmenu source "fs/Kconfig"
drivers/Kconfig +2 -0
@@ -58,6 +58,8 @@ source "drivers/usb/Kconfig" source "drivers/mmc/Kconfig" +source "drivers/platform/Kconfig" + source "drivers/infiniband/Kconfig" source "drivers/sn/Kconfig"
drivers/Makefile +1 -1
@@ -7,7 +7,7 @@ obj-$(CONFIG_PCI) += pci/ obj-$(CONFIG_PARISC) += parisc/ -obj-y += video/ +obj-y += video/ platform/ obj-$(CONFIG_ACPI_BOOT) += acpi/ # PnP must come after ACPI since it will eventually need to check if acpi # was used and do nothing if so
drivers/platform/.tmp_versions/mq11xx_base.mod new file +2 -0
@@ -0,0 +1,2 @@ +drivers/platform/mq11xx_base.ko +drivers/platform/mq11xx_base.o
drivers/platform/Kconfig new file +23 -0
@@ -0,0 +1,23 @@ +# +# Platform devices +# + +menu "Platform devices" + +config PLATFORM_MQ11XX + tristate "MediaQ 1100/32/68/78/88 SoC support" + ---help--- + MediaQ 1100/32/68/78/88 are system-on-chips that implement a + graphics engine, flat panel controller, USB function controller, + OHCI-compliant USB host controller (1132 only), I2S and SPI + controllers (also 1132 only). + + This driver implements only the basic support for MediaQ chips; + after you select this option the subdevice drivers will appear + in the respective submenus: MediaQ 1100/32/68/78/88 framebuffer + support, Dell Axim X5 LCD support and so on. + + To compile this driver as a module, choose M here: the + module will be called mq11xx_base.o. + +endmenu
drivers/platform/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# +# Makefile for platform device drivers. +# + +obj-$(CONFIG_PLATFORM_MQ11XX) += mq11xx_base.o
drivers/platform/mq11xx.h new file +925 -0
925 lines not on this page · raw message
drivers/platform/mq11xx_base.c new file +1390 -0
1,390 lines not on this page · raw message
Quoted 14 lines · <[email protected]> wrote:
This patch adds
platform_devicedriver for MQ11xx system-on-chip graphics chip. This chip is used in several non-PCI ARM and MIPS platforms such as the iPAQ H5550. Two subsequent patches add support for the framebuffer and USB gadget subdevices. This patch adds the toplevel driver todrivers/platformbecause it does not provide any specific functionality (e.g., framebuffer) and it not tied to a named physical bus. In these platforms, the MQ11xx is tied directly to the host bus....
drivers/platform/mq11xx_base.c new file +2
-0+ +static void
drivers/platform/mq11xx_base.c line 867
Quoted 10 lines
drivers/platform/mq11xx_base.c new file +10
-0+mq_free (struct mediaq11xx_base *zis, u32 addr, unsigned size) +{ + int i, j; +u32 eaddr; +struct mq_data *mqdata =to_mq_data (zis); + + size = (size +MEMBLOCK_ALIGN -1 ) & ~(MEMBLOCK_ALIGN -1 ); + eaddr = addr + size; + +spin_lock (&mqdata->mem_lock);
It's unusual for a memory allocate/free function to not be IRQ-safe. Will there never be a requirement that mq_free() or mq_alloc() be called from interrupts or softirq's?
Review
Quoted 1 line
(quoted diff) +1
-0+ spin_unlock (&mqdata->mem_lock);
You've religiously used the wrong coding style throughout these patches:
neither core kernel nor arch/arm places a space before the opening paren. A little thing, but easy to get right.
There are eight-spaces where tabs should be in various places too..