Re: [PATCH v2 2/3] OMAP: SDP: Introducing 'board-sdp-flash.c' for flash init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 8, 2010 at 7:22 PM, Ladislav Michl <Ladislav.Michl@xxxxxxxxx> wrote:
>> diff --git a/arch/arm/mach-omap2/board-sdp-flash.c
>> b/arch/arm/mach-omap2/board-sdp-flash.c
>> new file mode 100644
>> index 0000000..54ef19f
>> --- /dev/null
>> +++ b/arch/arm/mach-omap2/board-sdp-flash.c
> [snip]
>> +static void omap_set_vpp(struct map_info *map, int enable)
>> +{
>> +     static int      count;
>> +     u32 l;
>> +
>> +     if (cpu_class_is_omap1()) {
>> +             if (enable) {
>> +                     if (count++ == 0) {
>> +                             l = omap_readl(EMIFS_CONFIG);
>> +                             l |= OMAP_EMIFS_CONFIG_WP;
>> +                             omap_writel(l, EMIFS_CONFIG);
>> +                     }
>> +             } else {
>> +                     if (count && (--count == 0)) {
>> +                             l = omap_readl(EMIFS_CONFIG);
>> +                             l &= ~OMAP_EMIFS_CONFIG_WP;
>> +                             omap_writel(l, EMIFS_CONFIG);
>> +                     }
>> +             }
>> +     }
>> +}
>
> Hmm, as you are adding files into arch/arm/mach-omap2 directory, is there
> a chance cpu_class_is_omap1() ever returns non-zero?
>
>> +static struct physmap_flash_data sdp_nor_data = {
>> +     .width          = 2,
>> +     .set_vpp        = omap_set_vpp,
>> +};
>
> ... and in case there is not, just leave set_vpp set to NULL and delete this
> incarnation of omap_set_vpp.
>

My bad. I just did not look into that.
I'll fix it as per your suggestion.

-- 
Regards,
Vimal Singh
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux