public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Gordon Bos <gordon@bosvangennip.nl>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Russell King <linux@arm.linux.org.uk>,
	devicetree@vger.kernel.org, Jason Cooper <jason@lakedaemon.net>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH 1/1] arm: Fix unavailable MTD userland devices on Excito B3 boards
Date: Sat, 07 Feb 2015 18:15:12 +0100	[thread overview]
Message-ID: <54D64820.7020002@bosvangennip.nl> (raw)
In-Reply-To: <20150207160945.GA22306@lunn.ch>

[-- Attachment #1: Type: text/plain, Size: 2959 bytes --]

Hi Andrew,

Unsure how it can work for you, but this is the corresponding entry from 
the Excito release:

---
|/*****************************************************************************
  * 2048KB SPI Flash on Boot Device (Numonyx MP25P16)
  ****************************************************************************/

static struct mtd_partition bubba3_flash_parts[] = {
  {
  .name = "u-boot",
  .size = SZ_512K+SZ_256K,
  .offset = 0,
  },
  {
  .name = "env",
  .size = SZ_128K,
  .offset = MTDPART_OFS_NXTBLK,
  },
  {
  .name = "data",
  .size = MTDPART_SIZ_FULL,
  .offset = MTDPART_OFS_NXTBLK,
  },
};

static const struct flash_platform_data bubba3_flash = {
  .type = "m25p16",
  .name = "spi_flash",
  .parts = bubba3_flash_parts,
  .nr_parts = ARRAY_SIZE(bubba3_flash_parts),
};

static struct spi_board_info __initdata bubba3_spi_slave_info[] = {
  {
  .modalias = "m25p80",
  .platform_data = &bubba3_flash,
  .irq = -1,
  .max_speed_hz = 40000000,
  .bus_num = 0,
  .chip_select = 0,
  },
};
---

I originally started out with a kernel build by user 'sakaki-' on git
(project gentoo-on-b3) and found that it had no access to MTD. The
readme on this project also states that the front led on the B3 will
go off for some 40 seconds or so and then go back on, which is achieved
by an openrc script after sysfs is mounted.

The behaviour we're seeing therefore seems to contradict what you must
be seeing, since you explicitly turn the green led off which would
indicate that the leds default to 'on' position in your case while on
multiple B3's we've now confirmed that the default is in fact off and
blue and red should be explicitly turned on.

As for MTD access I found that sakaki's original kernel did not have
CONFIG_MTD_M25P80 enabled but this did not fix access to MTD (see
discussion at http://forum.mybubba.org/viewtopic.php?f=7&t=5680&start=16
). Only after I changed the driver 'compatible' reference to match
m25p80 I got access to MTD (with that very same kernel).

As you may know, being a B3 owner, performing a shutdown requires
writing a 'magic' DWORD value to a specific location in mtd2 and mtd1
holds a key that is required for a dyndns service that is exclusive for
Excito B3 owners.

The submitted MTD patch has been confirmed to fix the issue on four
different B3's now, running gentoo patched kernels version 3.17.1, 3.18.3
and 3.18.5.


Regards,
Gordon Bos


|On 07/02/2015 17:09, Andrew Lunn wrote:
> On Sat, Feb 07, 2015 at 04:04:59PM +0100, Gordon Bos wrote:
>> Hi,
>>
>> I've had some further discussion on this with another B3 owner.
>> According to an old patch that Excito corporation built for kernel
>> version 2.6 the flash memory is in fact a ||Numonyx MP25P16
>> The driver however must be m25p80.
> Hi Gordon
>
> I need to reboot my B3 in order to see what it says. However, with the
> current DT i do have access to the MTD devices.
>
> What problems are you actually having?
>
> Thanks
>
> 	Andrew


[-- Attachment #2: Type: text/html, Size: 4677 bytes --]

  reply	other threads:[~2015-02-07 17:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06  8:45 [PATCH 1/1] arm: Fix unavailable MTD userland devices on Excito B3 boards Gordon Bos
     [not found] ` <1423212311-10793-1-git-send-email-gordon-PMRpws9CsXpfxmBXdGbrbQ@public.gmane.org>
2015-02-06  9:09   ` Gregory CLEMENT
2015-02-07 15:04     ` Gordon Bos
     [not found]       ` <54D6299B.70707-PMRpws9CsXpfxmBXdGbrbQ@public.gmane.org>
2015-02-07 16:09         ` Andrew Lunn
2015-02-07 17:15           ` Gordon Bos [this message]
     [not found]             ` <54D64820.7020002-PMRpws9CsXpfxmBXdGbrbQ@public.gmane.org>
2015-02-07 17:36               ` Andrew Lunn
2015-02-07 18:22                 ` Gordon Bos
     [not found]                   ` <54D657D5.3010709-PMRpws9CsXpfxmBXdGbrbQ@public.gmane.org>
2015-02-07 18:40                     ` Andrew Lunn
2015-02-07 19:59                       ` Gordon Bos
     [not found]                         ` <54D66EB2.2030006-PMRpws9CsXpfxmBXdGbrbQ@public.gmane.org>
2015-02-07 20:25                           ` Andrew Lunn
2015-02-07 16:37         ` Andrew Lunn

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=54D64820.7020002@bosvangennip.nl \
    --to=gordon@bosvangennip.nl \
    --cc=andrew@lunn.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=gregory.clement@free-electrons.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jason@lakedaemon.net \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.hesselbarth@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