public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Petr Cvek <petr.cvek@tul.cz>
To: daniel@zonque.org, haojian.zhuang@gmail.com,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	dwmw2@infradead.org, computersforpeace@gmail.com,
	eric.y.miao@gmail.com
Cc: linux-arm-kernel@lists.infradead.org, linux-mtd@lists.infradead.org
Subject: [BUG, RFC] MTD Execute in Place on ARM breaks build
Date: Fri, 07 Aug 2015 22:20:41 +0200	[thread overview]
Message-ID: <55C51319.2010901@tul.cz> (raw)

Hello,

Configuration:

	CONFIG_MTD_XIP=y

on PXA2xx architecture causes request of undefined macros from 

	drivers/mtd/chipscfi_cmdset_0001.c

These macros (using ICIP and ICMR) are defined here:

	http://lxr.free-electrons.com/source/arch/arm/mach-pxa/include/mach/mtd-xip.h#L20

register definitions for ICIP and ICMR were removed by commit:
	
	5d284e353eb11ab2e8b1c5671ba06489b0bd1e0c

Similar is for macros with OSCR (lines 23 and 24), which have different type.
Re-adding ICIP and ICMR definition and explicit type conversion will fix the build
and the kernel boots, but I'm not yet able to test XIP functionality (too many different
bugs to flash over windows mobile image).

My temporal fix (ugly):

#define ICIP __REG(0x40D00000)  /* Interrupt Controller IRQ Pending Register */
#define ICMR __REG(0x40D00004)  /* Interrupt Controller Mask Register */
...
#define xip_currtime()		((unsigned long) OSCR)
#define xip_elapsed_since(x)	(signed)((((unsigned long) OSCR) - (x)) / 4)


P.S. Same macros are used on omap1 and sa1100 too.

Petr Cvek

             reply	other threads:[~2015-08-07 20:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07 20:20 Petr Cvek [this message]
2015-08-08 11:42 ` [BUG, RFC] MTD Execute in Place on ARM breaks build Arnd Bergmann
2015-08-08 13:47   ` Russell King - ARM Linux
2015-08-08 18:52     ` Petr Cvek
2015-08-08 19:34       ` Russell King - ARM Linux

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=55C51319.2010901@tul.cz \
    --to=petr.cvek@tul.cz \
    --cc=computersforpeace@gmail.com \
    --cc=daniel@zonque.org \
    --cc=dwmw2@infradead.org \
    --cc=eric.y.miao@gmail.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=robert.jarzmik@free.fr \
    /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