From: Peter Hung <hpeter@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
jslaby@suse.com,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
tom_tsai@fintek.com.tw, Peter H <peter_hong@fintek.com.tw>,
Peter Hung <hpeter+linux_kernel@gmail.com>
Subject: Re: [PATCH RESEND 1/1] serial: 8250_pci: Fix real serial port count for F81504/508/512
Date: Tue, 15 Dec 2015 10:56:08 +0800 [thread overview]
Message-ID: <566F8148.5020600@gmail.com> (raw)
In-Reply-To: <CAHp75Vd45Wogz83L8tB7XdvYO1bfn9C4sc3sHgr1Vskka-X3fw@mail.gmail.com>
Hello,
Andy Shevchenko 於 2015/12/13 上午 09:08 寫道:
> On Tue, Dec 1, 2015 at 8:54 AM, Peter Hung <hpeter@gmail.com> wrote:
> First of all, maybe you can consider to split this part of the driver
> to separate one? (Like we did for 8250_mid.c). It seems 8250_pci is
> too bloated. But it's just an idea, maybe for future.
It's a good idea. Our PCI-to-UART device is a multifunctional
(GPIO/UART) board, I need try to split it from 8250_pci.c to
implements all functions.
>>
>> +/* The device is multi-function with UART & GPIO */
>> +static u8 fintek_gpio_mapping[] = {2, 3, 8, 9, 10, 11};
>
> Clearly you have bit combination here
> Bit 1: 1
> Bit 3: 1
>
> So, mask as 0x0a shall cover this IIAC.
IMO, It maybe wrong. If we checked only with 0x0a mask,
the 0x06 & 0x07 will be passed.
I had try with k-map to reduce from 0~11 (12~15 for don't care).
The final boolean value is a + c b(bar) for a is MSB.
>> - config_base = 0x40 + 0x08 * idx;
>> + switch (pdev->device) {
>> + case 0x1104: /* 4 ports */
>
> Maybe you can introduce constants for IDs.
I'll make the magic numbers with #define marco.
Thanks for your advices.
--
With Best Regards,
Peter Hung
next prev parent reply other threads:[~2015-12-15 2:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 6:54 [PATCH RESEND 1/1] serial: 8250_pci: Fix real serial port count for F81504/508/512 Peter Hung
2015-12-13 1:08 ` Andy Shevchenko
2015-12-15 2:56 ` Peter Hung [this message]
2015-12-20 17:16 ` Andy Shevchenko
2015-12-28 3:42 ` Peter Hung
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=566F8148.5020600@gmail.com \
--to=hpeter@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpeter+linux_kernel@gmail.com \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter_hong@fintek.com.tw \
--cc=tom_tsai@fintek.com.tw \
/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).