linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: Jonas Gorski <jonas.gorski@gmail.com>
Cc: ralf@linux-mips.org, linux-wireless@vger.kernel.org,
	zajec5@gmail.com, linux-mips@linux-mips.org, mb@bu3sch.de,
	george@znau.edu.ua, arend@broadcom.com,
	b43-dev@lists.infradead.org, bernhardloos@googlemail.com,
	arnd@arndb.de, julian.calaby@gmail.com, sshtylyov@mvista.com
Subject: Re: [PATCH 10/11] bcm47xx: add support for bcma bus
Date: Wed, 13 Jul 2011 22:05:54 +0200	[thread overview]
Message-ID: <4E1DFAA2.8060800@hauke-m.de> (raw)
In-Reply-To: <CAOiHx=myVVQYJumwhy7FwoSp5-mebhryDs1xnKMLCZpn=NP-7Q@mail.gmail.com>

Hi  Jonas,

Thank you for the review.

On 07/13/2011 09:52 PM, Jonas Gorski wrote:
> On 9 July 2011 13:06, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>> This patch add support for the bcma bus. Broadcom uses only Mips 74K
>> CPUs on the new SoC and on the old ons using ssb bus there are no Mips
>> 74K CPUs.
>>
>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>> ---
>>  arch/mips/bcm47xx/Kconfig                    |   13 ++++++
>>  arch/mips/bcm47xx/gpio.c                     |   22 +++++++++++
>>  arch/mips/bcm47xx/nvram.c                    |   10 +++++
>>  arch/mips/bcm47xx/serial.c                   |   29 ++++++++++++++
>>  arch/mips/bcm47xx/setup.c                    |   53 +++++++++++++++++++++++++-
>>  arch/mips/bcm47xx/time.c                     |    5 ++
>>  arch/mips/include/asm/mach-bcm47xx/bcm47xx.h |    8 ++++
>>  arch/mips/include/asm/mach-bcm47xx/gpio.h    |   41 ++++++++++++++++++++
>>  drivers/watchdog/bcm47xx_wdt.c               |   11 +++++
>>  9 files changed, 190 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/mips/bcm47xx/Kconfig b/arch/mips/bcm47xx/Kconfig
>> index 0346f92..6210b8d 100644
>> --- a/arch/mips/bcm47xx/Kconfig
>> +++ b/arch/mips/bcm47xx/Kconfig
>> @@ -15,4 +15,17 @@ config BCM47XX_SSB
>>
>>         This will generate an image with support for SSB and MIPS32 R1 instruction set.
>>
>> +config BCM47XX_BCMA
>> +       bool "BCMA Support for Broadcom BCM47XX"
>> +       select SYS_HAS_CPU_MIPS32_R2
>> +       select BCMA
>> +       select BCMA_HOST_SOC
>> +       select BCMA_DRIVER_MIPS
>> +       select BCMA_DRIVER_PCI_HOSTMODE if PCI
>> +       default y
>> +       help
>> +        Add support for new Broadcom BCM47xx boards with Broadcom specific Advanced Microcontroller Bus.
>> +
>> +        This will generate an image with support for BCMA and MIPS32 R2 instruction set.
>> +
> 
> BCM47XX_SSB and BCM47XX_BCMA should either exclude each other, or
> SYS_HAS_CPU_MIPS32_R2 should only be selected when BCM47XX_SSB isn't
> selected.
> I would expect an image built when having both selected to also
> support both systems, but selecting MIPS32_R2 as the CPU this will
> make it actually not work on SSB systems.
It should be possible to build a kernel capable of running with both
versions. I would change "select SYS_HAS_CPU_MIPS32_R2" to "select
SYS_HAS_CPU_MIPS32_R2 if !BCM47XX_SSB" that should make the image mips
r1 compatible if it was build for older cpus.
> 
>> diff --git a/arch/mips/bcm47xx/gpio.c b/arch/mips/bcm47xx/gpio.c
>> index 3320e91..9d5bafe 100644
>> --- a/arch/mips/bcm47xx/gpio.c
>> +++ b/arch/mips/bcm47xx/gpio.c
>> @@ -36,6 +36,16 @@ int gpio_request(unsigned gpio, const char *tag)
>>
>>                return 0;
>>  #endif
>> +#ifdef CONFIG_BCM47XX_BCMA
>> +       case BCM47XX_BUS_TYPE_BCMA:
>> +               if ((unsigned)gpio >= BCM47XX_CHIPCO_GPIO_LINES)
> 
> gpio is already unsigned, you shouldn't need to cast it.
Will do that.
> 
>> +                       return -EINVAL;
>> +
>> +               if (test_and_set_bit(gpio, gpio_in_use))
>> +                       return -EBUSY;
>> +
>> +               return 0;
>> +#endif
>>        }
>>        return -EINVAL;
>>  }
>> @@ -57,6 +67,14 @@ void gpio_free(unsigned gpio)
>>                clear_bit(gpio, gpio_in_use);
>>                return;
>>  #endif
>> +#ifdef CONFIG_BCM47XX_BCMA
>> +       case BCM47XX_BUS_TYPE_BCMA:
>> +               if ((unsigned)gpio >= BCM47XX_CHIPCO_GPIO_LINES)
> 
> Ditto.


  reply	other threads:[~2011-07-13 20:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-09 11:05 [PATCH 00/11] bcma: add support for embedded devices like bcm4716 Hauke Mehrtens
2011-07-09 11:05 ` [PATCH 01/11] bcma: move parsing of EEPROM into own function Hauke Mehrtens
2011-07-09 11:05 ` [PATCH 02/11] bcma: move initializing of struct bcma_bus to " Hauke Mehrtens
2011-07-09 11:05 ` [PATCH 03/11] bcma: add functions to scan cores needed on SoCs Hauke Mehrtens
2011-07-09 11:05 ` [PATCH 04/11] bcma: add SOC bus Hauke Mehrtens
2011-07-13 19:36   ` Jonas Gorski
2011-07-14 20:37     ` Hauke Mehrtens
2011-07-09 11:05 ` [PATCH 05/11] bcma: add mips driver Hauke Mehrtens
2011-07-13 20:39   ` Jonas Gorski
2011-07-09 11:05 ` [PATCH 06/11] bcma: add serial console support Hauke Mehrtens
2011-07-13 20:56   ` Jonas Gorski
2011-07-09 11:05 ` [PATCH 07/11] bcma: get CPU clock Hauke Mehrtens
2011-07-09 11:06 ` [PATCH 08/11] bcm47xx: prepare to support different buses Hauke Mehrtens
2011-07-09 11:06 ` [PATCH 09/11] bcm47xx: make it possible to build bcm47xx without ssb Hauke Mehrtens
2011-07-09 11:06 ` [PATCH 10/11] bcm47xx: add support for bcma bus Hauke Mehrtens
2011-07-13 19:52   ` Jonas Gorski
2011-07-13 20:05     ` Hauke Mehrtens [this message]
2011-07-09 11:06 ` [PATCH 11/11] bcm47xx: fix irq assignment for new SoCs Hauke Mehrtens
2011-07-13 18:33 ` [PATCH 00/11] bcma: add support for embedded devices like bcm4716 John W. Linville
  -- strict thread matches above, loose matches on Subject: below --
2011-07-22 23:20 [PATCH v3 " Hauke Mehrtens
2011-07-22 23:20 ` [PATCH 10/11] bcm47xx: add support for bcma bus Hauke Mehrtens

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=4E1DFAA2.8060800@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=arend@broadcom.com \
    --cc=arnd@arndb.de \
    --cc=b43-dev@lists.infradead.org \
    --cc=bernhardloos@googlemail.com \
    --cc=george@znau.edu.ua \
    --cc=jonas.gorski@gmail.com \
    --cc=julian.calaby@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mb@bu3sch.de \
    --cc=ralf@linux-mips.org \
    --cc=sshtylyov@mvista.com \
    --cc=zajec5@gmail.com \
    /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).