Initial DT support for MSM8660
Subsystems (5)
v3 cover Initial DT support for MSM8660
This series adds initial support for booting the MSM8660 via devicetree. The target boots with a serial console, and no platform data.
In order to test this with a devicetree boot, it is necessary to include patches allowing the devicetree to be appended to the kernel, and merge ATAG values into the DT.
Once these patches reach mainline, I intend to remove the non-DT boot for this target.
History:
v2 - Consistent name for msm-uart devices.
v3 - Use separate names for hsuart and lsuart, and common name.
Clean up io mapping for FPGA registers.
David Brown (4):
msm_serial: Use relative resources for iomem
msm_serial: Add devicetree support
ARM: msm: Add devicetree support for msm8660-surf
ARM: msm: Describe MSM 8660 SURF FPGA registers in DT
.../devicetree/bindings/tty/serial/msm_serial.txt | 22 +++++ arch/arm/boot/dts/msm8660-surf.dts | 29 ++++++ arch/arm/mach-msm/board-msm8x60.c | 98 ++++++++++++++++++-- drivers/tty/serial/msm_serial.c | 30 ++++-- 4 files changed, 162 insertions(+), 17 deletions(-) create mode 100644 Documentation/devicetree/bindings/tty/serial/msm_serial.txt create mode 100644 arch/arm/boot/dts/msm8660-surf.dts
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
PATCH v3 1/4 msm_serial: Use relative resources for iomem
Device tree iomem resources are only accessible by index, and not by name. The msm_serial devices always have either 1 or 2 iomem resources, that are always in the same order. Convert the platform_get_resource_byname into just platform_get_resource to facilitate device tree conversion.
--- drivers/tty/serial/msm_serial.c | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-)
drivers/tty/serial/msm_serial.c +6 -10
@@ -589,9 +589,8 @@ static void msm_release_port(struct uart_port *port)iowrite32 (GSBI_PROTOCOL_IDLE , msm_port->gsbi_base +GSBI_CONTROL ); - gsbi_resource =platform_get_resource_byname (pdev, -IORESOURCE_MEM , -"gsbi_resource" ); + gsbi_resource =platform_get_resource (pdev, +IORESOURCE_MEM ,1 );if (unlikely (!gsbi_resource))return ;
@@ -612,8 +611,7 @@ static int msm_request_port(struct uart_port *port)resource_size_t size;int ret; - uart_resource =platform_get_resource_byname (pdev,IORESOURCE_MEM , -"uart_resource" ); + uart_resource =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (unlikely (!uart_resource))return -ENXIO ;
@@ -628,8 +626,7 @@ static int msm_request_port(struct uart_port *port) goto fail_release_port; } - gsbi_resource =platform_get_resource_byname (pdev,IORESOURCE_MEM , -"gsbi_resource" ); + gsbi_resource =platform_get_resource (pdev,IORESOURCE_MEM ,1 );/* Is this a GSBI-based port? */ if (gsbi_resource) { size =resource_size (gsbi_resource);
@@ -875,7 +872,7 @@ static int __init msm_serial_probe(struct platform_device *pdev) port->dev = &pdev->dev; msm_port =UART_TO_MSM (port); -if (platform_get_resource_byname (pdev,IORESOURCE_MEM ,"gsbi_resource" )) +if (platform_get_resource (pdev,IORESOURCE_MEM ,1 )) msm_port->is_uartdm =1 ;else msm_port->is_uartdm =0 ;
@@ -899,8 +896,7 @@ static int __init msm_serial_probe(struct platform_device *pdev)printk (KERN_INFO "uartclk = %d\n" , port->uartclk); - resource =platform_get_resource_byname (pdev,IORESOURCE_MEM , -"uart_resource" ); + resource =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (unlikely (!resource))return -ENXIO ; port->mapbase = resource->start;
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
PATCH v3 1/4 msm_serial: Use relative resources for iomem
In reply to a message not in the archiveDevice tree iomem resources are only accessible by index, and not by name. The msm_serial devices always have either 1 or 2 iomem resources, that are always in the same order. Convert the platform_get_resource_byname into just platform_get_resource to facilitate device tree conversion.
--- drivers/tty/serial/msm_serial.c | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-)
drivers/tty/serial/msm_serial.c +6 -10
@@ -589,9 +589,8 @@ static void msm_release_port(struct uart_port *port)iowrite32 (GSBI_PROTOCOL_IDLE , msm_port->gsbi_base +GSBI_CONTROL ); - gsbi_resource =platform_get_resource_byname (pdev, -IORESOURCE_MEM , -"gsbi_resource" ); + gsbi_resource =platform_get_resource (pdev, +IORESOURCE_MEM ,1 );if (unlikely (!gsbi_resource))return ;
@@ -612,8 +611,7 @@ static int msm_request_port(struct uart_port *port)resource_size_t size;int ret; - uart_resource =platform_get_resource_byname (pdev,IORESOURCE_MEM , -"uart_resource" ); + uart_resource =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (unlikely (!uart_resource))return -ENXIO ;
@@ -628,8 +626,7 @@ static int msm_request_port(struct uart_port *port) goto fail_release_port; } - gsbi_resource =platform_get_resource_byname (pdev,IORESOURCE_MEM , -"gsbi_resource" ); + gsbi_resource =platform_get_resource (pdev,IORESOURCE_MEM ,1 );/* Is this a GSBI-based port? */ if (gsbi_resource) { size =resource_size (gsbi_resource);
@@ -875,7 +872,7 @@ static int __init msm_serial_probe(struct platform_device *pdev) port->dev = &pdev->dev; msm_port =UART_TO_MSM (port); -if (platform_get_resource_byname (pdev,IORESOURCE_MEM ,"gsbi_resource" )) +if (platform_get_resource (pdev,IORESOURCE_MEM ,1 )) msm_port->is_uartdm =1 ;else msm_port->is_uartdm =0 ;
@@ -899,8 +896,7 @@ static int __init msm_serial_probe(struct platform_device *pdev)printk (KERN_INFO "uartclk = %d\n" , port->uartclk); - resource =platform_get_resource_byname (pdev,IORESOURCE_MEM , -"uart_resource" ); + resource =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (unlikely (!resource))return -ENXIO ; port->mapbase = resource->start;
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
PATCH v3 2/4 msm_serial: Add devicetree support
In reply to David BrownAdd devicetree support to the msm_serial driver. Clocks are still queried by direct name from the driver until device tree clock support is implemented.
--- .../devicetree/bindings/tty/serial/msm_serial.txt | 27 ++++++++++++++++++++ drivers/tty/serial/msm_serial.c | 14 ++++++++++ 2 files changed, 41 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/tty/serial/msm_serial.txt
Documentation/devicetree/bindings/tty/serial/msm_serial.txt new file +27 -0
@@ -0,0 +1,27 @@ +* Qualcomm MSM UART + +Required properties: +- compatible : + - "qcom,msm-uart", and one of "qcom,msm-hsuart" or + "qcom,msm-lsuart". +- reg : offset and length of the register set for the device + for the hsuart operating in compatible mode, there should be a + second pair describing the gsbi registers. +- interrupts : should contain the uart interrupt. + +There are two different UART blocks used in MSM devices, +"qcom,msm-hsuart" and "qcom,msm-lsuart". The msm-serial driver is +able to handle both of these, and matches against the "qcom,msm-uart" +as the compatibility. + +The registers for the "qcom,msm-hsuart" device need to specify both +register blocks, even for the common driver. + +Example: + + uart at 19c400000 { + compatible = "qcom,msm-hsuart", "qcom,msm-uart"; + reg = <0x19c40000 0x1000>, + <0x19c00000 0x1000>; + interrupts = <195>; + };
drivers/tty/serial/msm_serial.c +14 -0
@@ -19,6 +19,7 @@# define SUPPORT_SYSRQ #endif +#include <linux/atomic.h> #include <linux/hrtimer.h> #include <linux/module.h> #include <linux/io.h>
@@ -33,6 +34,8 @@#include <linux/clk.h> #include <linux/platform_device.h> #include <linux/delay.h> +#include <linux/of.h> +#include <linux/of_device.h> #include "msm_serial.h"
@@ -856,6 +859,8 @@ static struct uart_driver msm_uart_driver = { .cons = MSM_CONSOLE, }; +static atomic_t msm_uart_next_id =ATOMIC_INIT (0 ); +static int __init msm_serial_probe (struct platform_device *pdev) {struct msm_port *msm_port;
@@ -863,6 +868,9 @@ static int __init msm_serial_probe(struct platform_device *pdev)struct uart_port *port;int irq; +if (pdev->id ==-1 ) + pdev->id =atomic_inc_return (&msm_uart_next_id) -1 ; +if (unlikely (pdev->id <0 || pdev->id >=UART_NR ))return -ENXIO ;
@@ -920,11 +928,17 @@ static int __devexit msm_serial_remove(struct platform_device *pdev)return 0 ; } +static struct of_device_id msm_match_table[] = { + { .compatible ="qcom,msm-uart" }, + {} +}; +static struct platform_driver msm_platform_driver = { .remove = msm_serial_remove, .driver = { .name ="msm_serial" , .owner =THIS_MODULE , + .of_match_table = msm_match_table, }, };
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
PATCH v3 3/4 ARM: msm: Add devicetree support for msm8660-surf
In reply to a message not in the archiveAdds support for booting via device tree with a simple serial console.
--- arch/arm/boot/dts/msm8660-surf.dts | 24 +++++++++++++++ arch/arm/mach-msm/board-msm8x60.c | 58 +++++++++++++++++++++++++++++++---- 2 files changed, 75 insertions(+), 7 deletions(-) create mode 100644 arch/arm/boot/dts/msm8660-surf.dts
arch/arm/boot/dts/msm8660-surf.dts new file +24 -0
@@ -0,0 +1,24 @@ +/dts-v1/; + +/include/ "skeleton.dtsi" + +/ { + model = "Qualcomm MSM8660 SURF"; + compatible = "qcom,msm8660-surf", "qcom,msm8660"; + interrupt-parent = <&intc>; + + intc: interrupt-controller@02080000 { + compatible = "qcom,msm-8660-qgic"; + interrupt-controller; + #interrupt-cells = <1>; + reg = < 0x02080000 0x1000 >, + < 0x02081000 0x1000 >; + }; + + serial@19c400000 { + compatible = "qcom,msm-hsuart", "qcom,msm-uart"; + reg = <0x19c40000 0x1000>, + <0x19c00000 0x1000>; + interrupts = <195>; + }; +};
arch/arm/mach-msm/board-msm8x60.c +51 -7
82 lines not on this page · raw message
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
PATCH v3 3/4 ARM: msm: Add devicetree support for msm8660-surf
In reply to David BrownAdds support for booting via device tree with a simple serial console.
--- arch/arm/boot/dts/msm8660-surf.dts | 24 +++++++++++++++ arch/arm/mach-msm/board-msm8x60.c | 58 +++++++++++++++++++++++++++++++---- 2 files changed, 75 insertions(+), 7 deletions(-) create mode 100644 arch/arm/boot/dts/msm8660-surf.dts
arch/arm/boot/dts/msm8660-surf.dts new file +24 -0
@@ -0,0 +1,24 @@ +/dts-v1/; + +/include/ "skeleton.dtsi" + +/ { + model = "Qualcomm MSM8660 SURF"; + compatible = "qcom,msm8660-surf", "qcom,msm8660"; + interrupt-parent = <&intc>; + + intc: interrupt-controller at 02080000 { + compatible = "qcom,msm-8660-qgic"; + interrupt-controller; + #interrupt-cells = <1>; + reg = < 0x02080000 0x1000 >, + < 0x02081000 0x1000 >; + }; + + serial at 19c400000 { + compatible = "qcom,msm-hsuart", "qcom,msm-uart"; + reg = <0x19c40000 0x1000>, + <0x19c00000 0x1000>; + interrupts = <195>; + }; +};
arch/arm/mach-msm/board-msm8x60.c +51 -7
82 lines not on this page · raw message
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
PATCH v3 4/4 ARM: msm: Describe MSM 8660 SURF FPGA registers in DT
In reply to a message not in the archiveThe MSM 8660 SURF development board contains a register-accessible FPGA. By default, this FPGA configures the first UART in output-only mode. On this target, reconfigure this FPGA to enable the UART to be bidirectional.
--- arch/arm/boot/dts/msm8660-surf.dts | 5 +++ arch/arm/mach-msm/board-msm8x60.c | 49 +++++++++++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 4 deletions(-)
arch/arm/boot/dts/msm8660-surf.dts +5 -0
@@ -21,4 +21,9 @@ <0x19c00000 0x1000>; interrupts = <195>; }; + + qcom,fpga@1d000000 { + compatible = "qcom,msm8660-surf-fpga"; + reg = < 0x1d000000 0x1000 >; + }; };
arch/arm/mach-msm/board-msm8x60.c +45 -4
63 lines not on this page · raw message
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
PATCH v3 4/4 ARM: msm: Describe MSM 8660 SURF FPGA registers in DT
In reply to David BrownThe MSM 8660 SURF development board contains a register-accessible FPGA. By default, this FPGA configures the first UART in output-only mode. On this target, reconfigure this FPGA to enable the UART to be bidirectional.
--- arch/arm/boot/dts/msm8660-surf.dts | 5 +++ arch/arm/mach-msm/board-msm8x60.c | 49 +++++++++++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 4 deletions(-)
arch/arm/boot/dts/msm8660-surf.dts +5 -0
@@ -21,4 +21,9 @@ <0x19c00000 0x1000>; interrupts = <195>; }; + + qcom,fpga at 1d000000 { + compatible = "qcom,msm8660-surf-fpga"; + reg = < 0x1d000000 0x1000 >; + }; };
arch/arm/mach-msm/board-msm8x60.c +45 -4
63 lines not on this page · raw message
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Re: [PATCH v3 4/4] ARM: msm: Describe MSM 8660 SURF FPGA registers in DT
arch/arm/mach-msm/board-msm8x60.c static void __init msm8x60_init_irq(void) · line 72
Quoted 12 lines · David Brown
arch/arm/mach-msm/board-msm8x60.c +12
-0+static void __init msm8660_surf_fpga_init (void __iomem *fpga_mem) +{ +/* Advanced mode */ +writew (0xFFFF , fpga_mem +0x15C ); +/* FPGA_UART_SEL */ +writew (0 , fpga_mem +0x172 ); +/* FPGA_GPIO_CONFIG_117 */ +writew (1 , fpga_mem +0xEA ); +/* FPGA_GPIO_CONFIG_118 */ +writew (1 , fpga_mem +0xEC ); +dmb (); +}
Does the dmb() do the right thing here? It seems strange to combine a strictly ordered I/O instruction with another ordering instruction, and I think it would be better to use writew_relaxed for the first one, followed by a 'wmb()'.
Quoted 11 lines
arch/arm/mach-msm/board-msm8x60.c +11
-0+#ifdef CONFIG_OF +static void __init msm8660_surf_fpga_init_dt (void ) +{ +struct device_node *node; +void __iomem *fpga_mem; + + node =of_find_compatible_node (NULL ,NULL ,"qcom,msm8660-surf-fpga" ); +if (!node) +return ; + + fpga_mem =of_iomap (node,0 );
arch/arm/mach-msm/board-msm8x60.c static void __init msm8x60_init_irq(void) · line 102
Quoted 10 lines
arch/arm/mach-msm/board-msm8x60.c +10
-0+of_node_put (node); +if (!fpga_mem) { +printk (KERN_ERR "%s: Can't map fpga registers\n" , __func__); +return ; + } + +msm8660_surf_fpga_init (fpga_mem); + iounmap(fpga_mem); +} +#endif
Is the serial port connected through the FPGA or just configured by it?
In the former case, I think it would be better to make this a proper device driver that binds to the qcom,msm8660-surf-fpga device, configures it and then creates the platform_devices for the child nodes (the serial port, possibly others) by calling of_platform_bus_probe.
Arnd
Re: [PATCH v3 2/4] msm_serial: Add devicetree support
In reply to David BrownQuoted 5 lines · David Brown
Add devicetree support to the
msm_serialdriver. Clocks are still queried by direct name from the driver until device tree clock support is implemented.Signed-off-by David Brown <[email protected]>
Re: [PATCH v3 3/4] ARM: msm: Add devicetree support for msm8660-surf
In reply to David BrownQuoted 3 lines · David Brown
Adds support for booting via device tree with a simple serial console.
Signed-off-by David Brown <[email protected]>
Re: [PATCH v3 4/4] ARM: msm: Describe MSM 8660 SURF FPGA registers in DT
In reply to Arnd BergmannQuoted 17 lines · Arnd Bergmann
arch/arm/mach-msm/board-msm8x60.c static void __init msm8x60_init_irq(void) · line 72
Quoted 12 lines · David Brown
arch/arm/mach-msm/board-msm8x60.c +12
-0+static void __init msm8660_surf_fpga_init (void __iomem *fpga_mem) +{ +/* Advanced mode */ +writew (0xFFFF , fpga_mem +0x15C ); +/* FPGA_UART_SEL */ +writew (0 , fpga_mem +0x172 ); +/* FPGA_GPIO_CONFIG_117 */ +writew (1 , fpga_mem +0xEA ); +/* FPGA_GPIO_CONFIG_118 */ +writew (1 , fpga_mem +0xEC ); +dmb (); +}Does the
dmb()do the right thing here? It seems strange to combine a strictly ordered I/O instruction with another ordering instruction, and I think it would be better to usewritew_relaxedfor the first one, followed by a 'wmb()'.
I guess I didn't really think about that, I just kind of kept the code. I'll ask Stepan why he did it that way, and come up with a cleaner solution.
Quoted 15 lines
Quoted 15 lines
arch/arm/mach-msm/board-msm8x60.c +15
-0+#ifdef CONFIG_OF +static void __init msm8660_surf_fpga_init_dt (void ) +{ +struct device_node *node; +void __iomem *fpga_mem; + + node =of_find_compatible_node (NULL ,NULL ,"qcom,msm8660-surf-fpga" ); +if (!node) +return ; + + fpga_mem =of_iomap (node,0 ); +of_node_put (node); +if (!fpga_mem) { +printk (KERN_ERR "%s: Can't map fpga registers\n" , __func__); +return ;
Quoted 8 lines
arch/arm/mach-msm/board-msm8x60.c static void __init msm8x60_init_irq(void) · line 102
Quoted 6 lines
arch/arm/mach-msm/board-msm8x60.c +6
-0+ } + +msm8660_surf_fpga_init (fpga_mem); +iounmap (fpga_mem); +} +#endif Is the serial port connected through the FPGA or just configured by it?
The FPGA controls how the UART pins are connected on the development board. The serial port itself is in the MSM, not the FPGA, and on other dev boards this isn't needed for the serial port to work.
Quoted 5 lines
In the former case, I think it would be better to make this a proper device driver that binds to the qcom,msm8660-surf-fpga device, configures it and then creates the
platform_devicesfor the child nodes (the serial port, possibly others) by callingof_platform_bus_probe.
It might make sense to have the FPGA as a driver. I believe it was done early to make sure that the pins were configured correctly before the serial driver came up. As far as I can tell, the output pin is already configured correctly, so this can actually happen completely independently, since early usage of the UART is really only for console messages.
I don't think it makes sense for the serial to be a child node, this FPGA configuration is more along the lines of pinmux. Most configurations of this SOC don't have or need this fpga.
So, if I made it a separate driver, where would it go? Since this board still has platform device support, I suspect the platform data needed to describe this device would end up being larger than the driver itself.
David
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Re: [PATCH v3 4/4] ARM: msm: Describe MSM 8660 SURF FPGA registers in DT
Quoted 19 lines · David Brown
Quoted 17 lines · Arnd Bergmann
arch/arm/mach-msm/board-msm8x60.c static void __init msm8x60_init_irq(void) · line 72
Quoted 12 lines · David Brown
arch/arm/mach-msm/board-msm8x60.c +12
-0+static void __init msm8660_surf_fpga_init (void __iomem *fpga_mem) +{ +/* Advanced mode */ +writew (0xFFFF , fpga_mem +0x15C ); +/* FPGA_UART_SEL */ +writew (0 , fpga_mem +0x172 ); +/* FPGA_GPIO_CONFIG_117 */ +writew (1 , fpga_mem +0xEA ); +/* FPGA_GPIO_CONFIG_118 */ +writew (1 , fpga_mem +0xEC ); +dmb (); +}Does the
dmb()do the right thing here? It seems strange to combine a strictly ordered I/O instruction with another ordering instruction, and I think it would be better to usewritew_relaxedfor the first one, followed by a 'wmb()'.
Quoted 3 lines
I guess I didn't really think about that, I just kind of kept the code. I'll ask Stepan why he did it that way, and come up with a cleaner solution.
Yes, no worries. I saw later that the code already exists in similar form, so it is not urgent to change.
Quoted 24 lines
Quoted 15 lines
Quoted 15 lines
arch/arm/mach-msm/board-msm8x60.c +15
-0+#ifdef CONFIG_OF +static void __init msm8660_surf_fpga_init_dt (void ) +{ +struct device_node *node; +void __iomem *fpga_mem; + + node =of_find_compatible_node (NULL ,NULL ,"qcom,msm8660-surf-fpga" ); +if (!node) +return ; + + fpga_mem =of_iomap (node,0 ); +of_node_put (node); +if (!fpga_mem) { +printk (KERN_ERR "%s: Can't map fpga registers\n" , __func__); +return ;Quoted 8 lines
arch/arm/mach-msm/board-msm8x60.c static void __init msm8x60_init_irq(void) · line 102
Quoted 6 lines
arch/arm/mach-msm/board-msm8x60.c +6
-0+ } + +msm8660_surf_fpga_init (fpga_mem); +iounmap (fpga_mem); +} +#endif Is the serial port connected through the FPGA or just configured by it?
Quoted 3 lines
The FPGA controls how the UART pins are connected on the development board. The serial port itself is in the MSM, not the FPGA, and on other dev boards this isn't needed for the serial port to work.
ok.
Quoted 13 lines
Quoted 5 lines
In the former case, I think it would be better to make this a proper device driver that binds to the qcom,msm8660-surf-fpga device, configures it and then creates the
platform_devicesfor the child nodes (the serial port, possibly others) by callingof_platform_bus_probe.It might make sense to have the FPGA as a driver. I believe it was done early to make sure that the pins were configured correctly before the serial driver came up. As far as I can tell, the output pin is already configured correctly, so this can actually happen completely independently, since early usage of the UART is really only for console messages.
Quoted 3 lines
I don't think it makes sense for the serial to be a child node, this FPGA configuration is more along the lines of pinmux. Most configurations of this SOC don't have or need this fpga.
Agreed.
Quoted 4 lines
So, if I made it a separate driver, where would it go? Since this board still has platform device support, I suspect the platform data needed to describe this device would end up being larger than the driver itself.
Excellent question ;-)
When the driver is really small, I would just leave it in the board file for now, although that might not be a good long-term strategy. Do we have any similar cases that we can group together with the fpga to make a subsystem? Maybe it could be a small driver in the pinmux subsystem when that is established.
Arnd
Re: [PATCH v3 4/4] ARM: msm: Describe MSM 8660 SURF FPGA registers in DT
Quoted 5 lines
Quoted 4 lines
So, if I made it a separate driver, where would it go? Since this board still has platform device support, I suspect the platform data needed to describe this device would end up being larger than the driver itself.
Quoted 7 lines
Excellent question ;-)
When the driver is really small, I would just leave it in the board file for now, although that might not be a good long-term strategy. Do we have any similar cases that we can group together with the fpga to make a subsystem? Maybe it could be a small driver in the pinmux subsystem when that is established.
At this point, I think I'm just going to leave this FPGA initialization out. It seems that newer versions of the bootloader have made the FPGA entirely inaccessible. This has the unfortunate consequence of making the UART unusable on the MSM8660 SURF. I'll see if I can get this fixed at a bootloader level, or come up with another solution.
So, meanwhile, I'll include the other patches, which work fine on the MSM 8660 Fluid target, and I'll just make an additional dsb file for this. Patch soon...
The FLUID has the advantage of being a device that is technically available to people (although a bit pricey)
http://www.bsquare.com/snapdragon-mobile-development-platform.aspx
David
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.