Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1398316

Re: [PATCH v5 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration.

From David Lechner <david@lechnology.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration.
Date 2016-05-10 18:50 +0200
Message-ID <rxj18-6hc-3@gated-at.bofh.it> (permalink)
References <rx361-7sX-7@gated-at.bofh.it> <rx363-7sX-33@gated-at.bofh.it> <rxe1s-1qz-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 05/10/2016 06:26 AM, Sergei Shtylyov wrote:
> On 5/10/2016 2:46 AM, David Lechner wrote:
>
>> The CFGCHIP registers are used by a number of devices, so using a syscon
>> device to share them. The first consumer of this will by the
>> phy-da8xx-usb
>> driver.
>>
>> Signed-off-by: David Lechner <david@lechnology.com>
> [...]
>> diff --git a/arch/arm/mach-davinci/devices-da8xx.c
>> b/arch/arm/mach-davinci/devices-da8xx.c
>> index 725e693..69d11a1 100644
>> --- a/arch/arm/mach-davinci/devices-da8xx.c
>> +++ b/arch/arm/mach-davinci/devices-da8xx.c
>> @@ -11,6 +11,7 @@
>>   * (at your option) any later version.
>>   */
>>  #include <linux/init.h>
>> +#include <linux/platform_data/syscon.h>
>>  #include <linux/platform_device.h>
>>  #include <linux/dma-contiguous.h>
>>  #include <linux/serial_8250.h>
>> @@ -1109,3 +1110,30 @@ int __init da850_register_sata(unsigned long
>> refclkpn)
>>      return platform_device_register(&da850_sata_device);
>>  }
>>  #endif
>> +
>> +static struct syscon_platform_data da8xx_cfgchip_platform_data = {
>> +    .label    = "cfgchip",
>> +};
>> +
>> +static struct resource da8xx_cfgchip_resources[] = {
>> +    {
>> +        .start    = DA8XX_SYSCFG0_BASE + DA8XX_CFGCHIP0_REG,
>> +        .end    = DA8XX_SYSCFG0_BASE + DA8XX_CFGCHIP4_REG + 3,
>> +        .flags    = IORESOURCE_MEM,
>> +    },
>> +};
>> +
>> +static struct platform_device da8xx_cfgchip_device = {
>> +    .name    = "syscon",
>> +    .id    = 0,
>
>     Again, -1.
>
> [...]
>
> MBR, Sergei
>

I wish you would have noticed this when I first submitted it. I remember 
going back and forth about this. But it has been too long and I can't 
remember the reason why I chose to go this way.

It seems like changing it broke something with either this one or the 
phy device and I opted to keep it this way on both to be consistent. For 
example, the USB devices both use id = 0 as well even though there are 
only one of each type.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v5 0/5] da8xx USB PHY platform devices and clocks (was "da8xx UBS clocks") David Lechner <david@lechnology.com> - 2016-05-10 01:50 +0200
  [PATCH v5 1/5] ARM: davinci: da8xx: add usb phy clocks David Lechner <david@lechnology.com> - 2016-05-10 01:50 +0200
  [PATCH v5 4/5] ARM: DTS: da850: Add cfgchip syscon node David Lechner <david@lechnology.com> - 2016-05-10 01:50 +0200
  [PATCH v5 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration. David Lechner <david@lechnology.com> - 2016-05-10 01:50 +0200
    Re: [PATCH v5 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform  declaration. Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-05-10 13:30 +0200
      Re: [PATCH v5 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform  declaration. David Lechner <david@lechnology.com> - 2016-05-10 18:50 +0200
  [PATCH v5 3/5] ARM: davinci: da8xx: Add USB PHY platform declaration David Lechner <david@lechnology.com> - 2016-05-10 01:50 +0200
    Re: [PATCH v5 3/5] ARM: davinci: da8xx: Add USB PHY platform  declaration Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-05-10 13:30 +0200

csiph-web