From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Cc: linux-pcmcia@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [POWERPC] 8xx: mpc885ads pcmcia support
Date: Thu, 3 May 2007 09:48:03 +0200 [thread overview]
Message-ID: <200705030948.03984.arnd@arndb.de> (raw)
In-Reply-To: <20070503065435.4533.64938.stgit@localhost.localdomain>
On Thursday 03 May 2007, Vitaly Bordug wrote:
> Adds support for PowerQuicc on-chip PCMCIA. The driver is implemented as
> of_device, so only arch/powerpc stuff is capable to use it, which now
> implies only mpc885ads reference board.
Very nice, looks much better now than the previous version.
> diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts
> index 110bf61..89d585f 100644
> --- a/arch/powerpc/boot/dts/mpc885ads.dts
> +++ b/arch/powerpc/boot/dts/mpc885ads.dts
> @@ -112,6 +112,18 @@
> compatible = "CPM";
> };
>
> + pcmcia@0080 {
> + linux,phandle = <0080>;
> + #interrupt-cells = <1>;
> + #size-cells = <2>;
> + compatible = "8xx";
> + device_type = "pcmcia";
> + reg = <80 80>;
> + clock-frequency = <2faf080>;
> + interrupt-parent = <ff000000>;
> + interrupts = <d 1>;
> + };
> +
> cpm@ff000000 {
> linux,phandle = <ff000000>;
> #address-cells = <1>;
The compatible property should be a little more specific, imho. Since there
are differences in how things are done depending on the board, it would be
good to tell the exact method from the pcmcia node itself.
For example, you could make this
compatible = "8xx\0mpc885ads";
Your code doesn't currently use this, I like to have the option.
> +#ifdef CONFIG_PCMCIA_M8XX
> +static void pcmcia_hw_setup(int slot, int enable);
> +static int pcmcia_set_voltage(int slot, int vcc, int vpp);
> +
> +struct mpc8xx_pcmcia_ops m8xx_pcmcia_ops = {
> + .hw_ctrl = pcmcia_hw_setup,
> + .voltage_set = pcmcia_set_voltage,
> +};
> +#endif
> +
> void __init mpc885ads_board_setup(void)
> {
> cpm8xx_t *cp;
If you define the global variable in the board code, you can not have multiple
board implementations in a multiplatform kernel.
In order to make that work, you'd need to have the definition of m8xx_pcmcia_ops
in 8xx common code, and then assign the two function pointers dynamically in the
board initialization.
> + if (of_address_to_resource(np, 0, &r))
> + return -EINVAL;
> +
> + pcmcia = ioremap(r.start, r.end - r.start + 1);
> + if(pcmcia == NULL)
> + return -EINVAL;
A new of_iomap() function was recently added that allows you
to do these two steps in one.
> -/* connect interrupt and disable CxOE */
> + out_be32(M8XX_PGCRX(0), M8XX_PGCRX_CXOE | (mk_int_int_mask(hwirq) << 16));
> + out_be32(M8XX_PGCRX(1), M8XX_PGCRX_CXOE | (mk_int_int_mask(hwirq) << 16));
I'm not sure why you need to use the hwirq here, it should not be visible to
device drivers normally.
Is this the same as enable_irq(pcmcia_schlvl) ?
Arnd <><
next prev parent reply other threads:[~2007-05-03 7:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-03 6:54 [PATCH] [POWERPC] 8xx: mpc885ads pcmcia support Vitaly Bordug
2007-05-03 7:48 ` Arnd Bergmann [this message]
2007-05-03 15:43 ` Segher Boessenkool
2007-05-03 19:03 ` Arnd Bergmann
2007-05-03 22:17 ` Segher Boessenkool
-- strict thread matches above, loose matches on Subject: below --
2007-05-03 23:57 Vitaly Bordug
2007-05-04 0:01 ` Arnd Bergmann
2007-05-04 19:35 ` Andrew Morton
2007-05-05 23:27 ` Vitaly Bordug
2007-05-06 0:47 Vitaly Bordug
2007-05-06 1:04 ` Segher Boessenkool
2007-05-06 2:04 ` David Gibson
2007-05-06 9:48 ` Vitaly Bordug
2007-05-06 7:44 ` Vitaly Bordug
2007-05-06 13:26 ` Segher Boessenkool
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=200705030948.03984.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pcmcia@lists.infradead.org \
--cc=linuxppc-dev@ozlabs.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).