From: Qiang Wang <rurality.linux@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [Linux-arm-nuc900] RE: [PATCH]NUC900 LCD Controller Driver
Date: Mon, 01 Feb 2010 13:35:39 +0000 [thread overview]
Message-ID: <71413c851002010535w391ca149p210aa448ed10c19c@mail.gmail.com> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE1909020E976F@mi8nycmail19.Mi8.com>
在 2010年1月30日 上午8:37,H Hartley Sweeten <hartleys@visionengravers.com> 写道:
> On Friday, January 29, 2010 5:28 PM, Andrew Morton wrote:
>>
>> On Mon, 11 Jan 2010 17:05:44 +0900
>> Wang Qiang <rurality.linux@gmail.com> wrote:
>>
>>> hi, Dear Wan
>>>
>>> There is the patch of LCD controller driver for nuc900s.
>>> The Linux LOGO is just fine and the FB-Test application was ok, too.
>>>
>>> best regards
>>> wangqiang
>>>
>>>
>>> ...
>>>
>>> @@ -380,6 +381,48 @@ struct platform_device nuc900_device_kpi = {
>>> .resource = nuc900_kpi_resource,
>>> };
>>>
>>> +#ifdef CONFIG_FB_NUC900
>>> +
>>> +static struct resource nuc900_lcd_resource[] = {
>>> + [0] = {
>>> + .start = W90X900_PA_LCD,
>>> + .end = W90X900_PA_LCD + W90X900_SZ_LCD - 1,
>>> + .flags = IORESOURCE_MEM,
>>> + },
>>> + [1] = {
>>> + .start = IRQ_LCD,
>>> + .end = IRQ_LCD,
>>> + .flags = IORESOURCE_IRQ,
>>> + }
>>> +};
>>> +
>>> +static u64 nuc900_device_lcd_dmamask = 0xffffffffUL;
>>
>> I suspect this should have type `dma_addr_t', but `struct device' uses
>> open-coded u64 too. Odd.
>>
>> It makes no sense to initialise a u64 with an unsigned long value -
>> it's wrong on a 32-bit machine.
>>
>> this:
>>
>> static u64 nuc900_device_lcd_dmamask = -1;
>>
>> will work.
>>
>>> +struct platform_device nuc900_device_lcd = {
>>> + .name = "nuc900-lcd",
>>> + .id = -1,
>>> + .num_resources = ARRAY_SIZE(nuc900_lcd_resource),
>>> + .resource = nuc900_lcd_resource,
>>> + .dev = {
>>> + .dma_mask = &nuc900_device_lcd_dmamask,
>>> + .coherent_dma_mask = 0xffffffffUL
>>
>> And this gets initialised to 0x00000000ffffffff also. Using -1 will fix.
>>
>
> Wouldn't this also work?
>
> .dev = {
> .dma_mask = &nuc900_device_lcd.dev.coherent_dma_mask,
> .coherent_dma_mask = DMA_BIT_MASK(32),
> },
>
> Then you could just get rid of nuc900_device_lcd_dmamask.
Yes, you are right.
I will use the DMA_BIT_MASK macro.
Thank you very much.
>
> Regards,
> Hartley
>
next prev parent reply other threads:[~2010-02-01 13:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 8:05 [PATCH]NUC900 LCD Controller Driver Wang Qiang
2010-01-28 9:00 ` Qiang Wang
2010-01-30 0:27 ` Andrew Morton
2010-01-30 0:37 ` H Hartley Sweeten
2010-02-01 13:35 ` Qiang Wang [this message]
2010-02-02 5:14 ` [Linux-arm-nuc900] " Qiang Wang
2010-02-01 13:33 ` [Linux-arm-nuc900] " Qiang Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=71413c851002010535w391ca149p210aa448ed10c19c@mail.gmail.com \
--to=rurality.linux@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).