From: Gabor Juhos <juhosg@openwrt.org>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [RFC 07/12] ath9k: introduce platform driver for AHB bus support
Date: Sun, 04 Jan 2009 12:18:22 +0100 [thread overview]
Message-ID: <49609AFE.2010209@openwrt.org> (raw)
In-Reply-To: <20090104073022.GC12905@infradead.org>
Christoph Hellwig ?rta:
> On Sat, Jan 03, 2009 at 02:44:17PM +0100, Gabor Juhos wrote:
>> +static dma_addr_t ath_ahb_map_single_to_device(struct ath_softc *sc,
>> + void *p, size_t size)
>> +{
>> + return dma_map_single(NULL, p, size, DMA_TO_DEVICE);
>> +}
>
> As said before you should just use dma_* directly. And please make sure
> to always pass a struct device to the dma_* routines, even if your
> platform might currently not required it the API does.
>
>> +static void ath_ahb_cleanup(struct ath_softc *sc)
>> +{
>> + struct platform_device *pdev = to_platform_device(sc->dev);
>> + struct ieee80211_hw *hw = sc->hw;
>> + struct resource *res;
>> +
>> + res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>> + if (res)
>> + free_irq(res->start, sc);
>
> If you stored the irq value directly in the softc this whole thing might
> be able to be done in a generic way..
>
>
I did not want to store it in the softc, because 'struct pci_dev' has it already
and we will duplicate it. However the code will be simpler, so i can add it of
course.
WARNING: multiple messages have this Message-ID (diff)
From: Gabor Juhos <juhosg@openwrt.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: "John W. Linville" <linville@tuxdriver.com>,
"Luis R. Rodriguez" <lrodriguez@atheros.com>,
Jouni Malinen <jmalinen@atheros.com>,
"ath9k-devel@lists.ath9k.org" <ath9k-devel@venema.h4ckr.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Felix Fietkau <nbd@openwrt.org>, Imre Kaloz <kaloz@openwrt.org>
Subject: Re: [RFC 07/12] ath9k: introduce platform driver for AHB bus support
Date: Sun, 04 Jan 2009 12:18:22 +0100 [thread overview]
Message-ID: <49609AFE.2010209@openwrt.org> (raw)
In-Reply-To: <20090104073022.GC12905@infradead.org>
Christoph Hellwig =EDrta:
> On Sat, Jan 03, 2009 at 02:44:17PM +0100, Gabor Juhos wrote:
>> +static dma_addr_t ath_ahb_map_single_to_device(struct ath_softc *sc=
,
>> + void *p, size_t size)
>> +{
>> + return dma_map_single(NULL, p, size, DMA_TO_DEVICE);
>> +}
>=20
> As said before you should just use dma_* directly. And please make s=
ure
> to always pass a struct device to the dma_* routines, even if your
> platform might currently not required it the API does.
>=20
>> +static void ath_ahb_cleanup(struct ath_softc *sc)
>> +{
>> + struct platform_device *pdev =3D to_platform_device(sc->dev);
>> + struct ieee80211_hw *hw =3D sc->hw;
>> + struct resource *res;
>> +
>> + res =3D platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>> + if (res)
>> + free_irq(res->start, sc);
>=20
> If you stored the irq value directly in the softc this whole thing mi=
ght
> be able to be done in a generic way..
>=20
>=20
I did not want to store it in the softc, because 'struct pci_dev' has i=
t already
and we will duplicate it. However the code will be simpler, so i can ad=
d it of
course.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-01-04 11:18 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-03 13:44 [ath9k-devel] [RFC 00/12] ath9k: add preliminary support for the AR913x SoCs Gabor Juhos
2009-01-03 13:44 ` Gabor Juhos
2009-01-03 13:44 ` [ath9k-devel] [RFC 01/12] ath9k: introduce bus specific DMA routines Gabor Juhos
2009-01-03 13:44 ` Gabor Juhos
2009-01-04 7:26 ` [ath9k-devel] " Christoph Hellwig
2009-01-04 7:26 ` Christoph Hellwig
2009-01-04 11:16 ` [ath9k-devel] " Gabor Juhos
2009-01-04 11:16 ` Gabor Juhos
2009-01-03 13:44 ` [ath9k-devel] [RFC 02/12] ath9k: introduce bus specific register access routines Gabor Juhos
2009-01-03 13:44 ` Gabor Juhos
2009-01-04 7:27 ` [ath9k-devel] " Christoph Hellwig
2009-01-04 7:27 ` Christoph Hellwig
2009-01-04 11:17 ` [ath9k-devel] " Gabor Juhos
2009-01-04 11:17 ` Gabor Juhos
2009-01-03 13:44 ` [ath9k-devel] [RFC 03/12] ath9k: introduce bus specific cache size routine Gabor Juhos
2009-01-03 13:44 ` Gabor Juhos
2009-01-03 13:44 ` [ath9k-devel] [RFC 04/12] ath9k: introduce bus specific cleanup routine Gabor Juhos
2009-01-03 13:44 ` Gabor Juhos
2009-01-03 13:44 ` [ath9k-devel] [RFC 05/12] ath9k: move PCI code into separate file Gabor Juhos
2009-01-03 13:44 ` Gabor Juhos
2009-01-03 13:44 ` [ath9k-devel] [RFC 06/12] ath9k: convert to struct device Gabor Juhos
2009-01-03 13:44 ` Gabor Juhos
2009-01-03 13:44 ` [ath9k-devel] [RFC 07/12] ath9k: introduce platform driver for AHB bus support Gabor Juhos
2009-01-03 13:44 ` Gabor Juhos
2009-01-04 7:30 ` [ath9k-devel] " Christoph Hellwig
2009-01-04 7:30 ` Christoph Hellwig
2009-01-04 11:18 ` Gabor Juhos [this message]
2009-01-04 11:18 ` Gabor Juhos
2009-01-03 13:44 ` [ath9k-devel] [RFC 08/12] ath9k: get EEPROM contents from platform data on AHB bus Gabor Juhos
2009-01-03 13:44 ` Gabor Juhos
2009-01-05 10:29 ` [ath9k-devel] " Sujith
2009-01-05 10:29 ` Sujith
2009-01-05 12:23 ` [ath9k-devel] " Gabor Juhos
2009-01-05 12:23 ` Gabor Juhos
2009-01-06 9:38 ` [ath9k-devel] " Sujith
2009-01-06 9:38 ` Sujith
2009-01-03 13:44 ` [ath9k-devel] [RFC 09/12] ath9k: enable support for AR9100 Gabor Juhos
2009-01-03 13:44 ` Gabor Juhos
2009-01-03 13:44 ` [ath9k-devel] [RFC 10/12] ath9k: remove (u16) casts from rtc register access Gabor Juhos
2009-01-03 13:44 ` Gabor Juhos
2009-01-03 13:44 ` [ath9k-devel] [RFC 11/12] ath9k: fix ar5416Addac_9100 values Gabor Juhos
2009-01-03 13:44 ` Gabor Juhos
2009-01-03 13:44 ` [ath9k-devel] [RFC 12/12] ath9k: fix null pointer dereference in ani monitor code Gabor Juhos
2009-01-03 13:44 ` Gabor Juhos
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=49609AFE.2010209@openwrt.org \
--to=juhosg@openwrt.org \
--cc=ath9k-devel@lists.ath9k.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.