[l2-mtd:master 28/29] drivers/mtd/lpddr/lpddr2_nvm.c:149:2: error: implicit declaration of function 'writel_relaxed'
Vincenzo Aliberti
vincenzo.aliberti at gmail.com
Tue May 20 23:38:00 PDT 2014
Brian,
considering that this memory interface is implemented only on ARM
we can litimit the driver to ARM
in my opinion. Is it ok for you?
Regards,
Vincenzo
On Wed, May 21, 2014 at 3:49 AM, Brian Norris
<computersforpeace at gmail.com> wrote:
> On Wed, May 21, 2014 at 09:06:44AM +0800, kbuild test robot wrote:
>> tree: git://git.infradead.org/users/dedekind/l2-mtd.git master
>> head: 4007e2d175cc83ea728b757e49155826b32fbff8
>> commit: 96ba9dd65788a0bd2a7d1e57ec78b7642f0ccc25 [28/29] mtd: lpddr: add driver for LPDDR2-NVM PCM memories
>> config: make ARCH=x86_64 allyesconfig
>>
>> All error/warnings:
>>
>> drivers/mtd/lpddr/lpddr2_nvm.c: In function 'ow_enable':
>> >> drivers/mtd/lpddr/lpddr2_nvm.c:149:2: error: implicit declaration of function 'writel_relaxed' [-Werror=implicit-function-declaration]
>> writel_relaxed(build_mr_cfgmask(pcm_data->bus_width) | 0x18,
>> ^
>> cc1: some warnings being treated as errors
>>
>> vim +/writel_relaxed +149 drivers/mtd/lpddr/lpddr2_nvm.c
>>
>> 143 * Register, Device ID, etc
>> 144 */
>> 145 static inline void ow_enable(struct map_info *map)
>> 146 {
>> 147 struct pcm_int_data *pcm_data = map->fldrv_priv;
>> 148
>> > 149 writel_relaxed(build_mr_cfgmask(pcm_data->bus_width) | 0x18,
>> 150 pcm_data->ctl_regs + LPDDR2_MODE_REG_CFG);
>> 151 writel_relaxed(0x01, pcm_data->ctl_regs + LPDDR2_MODE_REG_DATA);
>> 152 }
>
> This is because writel_relaxed is not implemented consistently across
> all architectures. It looks like Will Deacon is trying to fix this.
>
> https://lkml.org/lkml/2014/4/17/267
>
> Vincenzo,
>
> What do you think? Should we:
>
> 1. Limit your driver to ARM (or other ARCH that supports
> writel_relaxed()?
> 2. Use writel() instead?
> 3. Wait for other ARCH'es to support writel_relaxed()?
>
> Brian
More information about the linux-mtd
mailing list