Re: [RFC/PATCH 1/2] omap: mailbox: initial hwmod support

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

 



On Tue, May 25, 2010 at 5:49 PM, Kevin Hilman
<khilman@xxxxxxxxxxxxxxxxxxx> wrote:
> Felipe Contreras <felipe.contreras@xxxxxxxxx> writes:
>
>> On Tue, May 25, 2010 at 3:00 AM, Kevin Hilman
>> <khilman@xxxxxxxxxxxxxxxxxxx> wrote:
>>> Felipe Contreras <felipe.contreras@xxxxxxxxx> writes:
>>>
>>>> Only OMAP3 would work.
>>>>
>>>> Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
>>>> ---
>>>>  arch/arm/mach-omap2/devices.c              |  103 +++++----------------------
>>>>  arch/arm/mach-omap2/mailbox.c              |   14 +---
>>>>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   45 ++++++++++++
>>>>  arch/arm/plat-omap/include/plat/mailbox.h  |    4 +
>>>>  4 files changed, 72 insertions(+), 94 deletions(-)
>>>>
>>>> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
>>>> index d9ac853..89f6cbc 100644
>>>> --- a/arch/arm/mach-omap2/devices.c
>>>> +++ b/arch/arm/mach-omap2/devices.c
>>>> @@ -20,12 +20,14 @@
>>>>  #include <asm/mach-types.h>
>>>>  #include <asm/mach/map.h>
>>>>
>>>> +#include <plat/omap_device.h>
>>>>  #include <plat/control.h>
>>>>  #include <plat/tc.h>
>>>>  #include <plat/board.h>
>>>>  #include <plat/mux.h>
>>>>  #include <mach/gpio.h>
>>>>  #include <plat/mmc.h>
>>>> +#include <plat/mailbox.h>
>>>>
>>>>  #include "mux.h"
>>>>
>>>> @@ -137,95 +139,28 @@ static inline void omap_init_camera(void)
>>>>  #endif
>>>>
>>>>  #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
>>>> +static inline void omap_init_mbox(void)
>>>> +{
>>>> +     struct omap_hwmod *hwmod;
>>>> +     struct omap_device *odev;
>>>> +     struct omap_mbox_platform_data pdata;
>> ...
>>
>>>> +     hwmod = omap_hwmod_lookup("mailbox");
>>>> +     if (!hwmod) {
>>>> +             pr_err("%s: unable to find hwmod\n", __func__);
>>>> +             return;
>>>> +     }
>>>>
>>>> -static struct platform_device mbox_device = {
>>>> -     .name           = "omap-mailbox",
>>>> -     .id             = -1,
>>>> -};
>>>> +     pdata.base_addr = hwmod->_rt_va;
>>>
>>> Shouldn't need the base address in pdata.  The driver should just do a
>>> platform_get_resource() to get the physical address and then ioremap.
>>
>> But the hwmod code already did ioremap in _find_mpu_rt_base().
>
> Yes, but that's a hwmod-internal implementation detail that may
> change, or may not be needed for some hwmods, or may be iounmapped
> after hwmod init etc.

So I have to do another ioremap()?

-- 
Felipe Contreras
--
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