linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mirza Krak <mirza.krak@hostmobility.com>
To: Wolfgang Grandegger <wg@grandegger.com>
Cc: linux-can@vger.kernel.org
Subject: Re: Dual SJA1000 can controllers on SMP system.
Date: Mon, 17 Jun 2013 08:10:43 +0200	[thread overview]
Message-ID: <51BEA863.1040704@hostmobility.com> (raw)
In-Reply-To: <51BDB1ED.1040603@grandegger.com>


On 06/16/2013 02:39 PM, Wolfgang Grandegger wrote:
> On 06/16/2013 01:20 PM, mirza@hostmobility.com wrote:
>>
>>
>> -------- Ursprungligt meddelande --------
>>> Från: Wolfgang Grandegger <wg@grandegger.com>
>>> Skickat: den 16 juni 2013 11:19
>>> Till: Mirza Krak <mirza.krak@hostmobility.com>
>>> Ämne: Re: Dual SJA1000 can controllers on SMP system.
>>>
>>> On 06/13/2013 02:47 PM, Mirza Krak wrote:
>>>> Dear Sirs.
>>>>
>>>> I am running a 3.1.10 kernel on Nvidia Tegra 2 CPU (Dual Core). Not
>>>> vanilla kernel (Linux4Tegra).
>>>>
>>>> We are using dual can controllers connected on th external data bus on
>>>> our custom hardware. The can controllers are SJA1000.
>>>
>>> What external data bus is the CAN controller connected to?
>>> And which CAN controller board/card?
>>
>> As I mentioned the CAN controllers are SJA1000 and the SJA1000 chip is integrated in our board. No external card/board for SJA1000 chip.
>>
>> It is connected to the Nvidia Tegra 2 externa data bus (a.k.a SNOR).
>>
>>>> Driver that is used is vanilla sja1000 driver (sja1000.c)
>>>
>>> Which bus driver is used and how do you load the module?
>>
>> The bus driver is tegra_snor and is linked in statically in the kernel.
>
> The low-level device initialization and access is not done in sja1000.c
> but by another driver module, e.g., sja1000_isa, sja1000_platform,
> ems_pci.c. What module are you using? What functions are you using to
> access the SNOR bus?

Aah off course. The low-level device driver is sja1000_platform.c. The 
functions I am using are sp_read_reg8 and sp_write_reg8 which I have 
slightly modified. Since I don't use multiplexed bus functionality I 
write the address first.

   static u8 sp_read_reg8(const struct sja1000_priv *priv, int reg)
{
	iowrite8(reg, priv->reg_base);
	return ioread8(priv->reg_base + 0x20);
}

static void sp_write_reg8(const struct sja1000_priv *priv, int reg, u8 val)
{
	iowrite8(reg, priv->reg_base);
	iowrite8(val, (priv->reg_base + 0x20));
}

>
> Wolfgang.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2013-06-17  6:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-16 11:20 Dual SJA1000 can controllers on SMP system mirza
2013-06-16 12:39 ` Wolfgang Grandegger
2013-06-17  6:10   ` Mirza Krak [this message]
2013-06-17  7:18     ` Marc Kleine-Budde
2013-06-17 13:46       ` Mirza Krak
2013-06-17 14:12         ` Marc Kleine-Budde
2013-06-17 18:49           ` Mirza Krak
2013-06-17 19:34             ` Wolfgang Grandegger
  -- strict thread matches above, loose matches on Subject: below --
2013-06-13 12:47 Mirza Krak
2013-06-16  9:20 ` Wolfgang Grandegger

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=51BEA863.1040704@hostmobility.com \
    --to=mirza.krak@hostmobility.com \
    --cc=linux-can@vger.kernel.org \
    --cc=wg@grandegger.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).