Commit graph

626 commits

Author SHA1 Message Date
Paul Mundt 46bc858720 sh: mach-microdev: SuperIO-relative ioport mapping.
The microdev only has to contend with silly PIO mangling on anything
within the SuperIO range. As each of the SuperIO modules is already
speciail cased, we just shift that logic over to the ioport map.

With microdev PCI never being merged (and being fudamentally broken in
hardware), and the ethernet chip only doing 16-bit accesses already,
there's no need to maintain any of the extra special casing. Kill it all
off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-29 18:42:22 +09:00
Russell King b3773301c4 Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/genesis-2.6 into devel-stable
Conflicts:
	drivers/video/sh_mobile_hdmi.c
2010-10-28 20:14:38 +01:00
Linus Torvalds 3c37629578 Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (32 commits)
  sh: intc: switch irq_desc iteration to new active IRQ iterator.
  sh: fix up cpu hotplug IRQ migration for irq_data changes.
  sh: oprofile: Make sure the backtrace op is available for timer-fallback.
  sh64: oprofile: Fix up kernel stack pointer size mismatch.
  sh: oprofile: Fix up and extend op_name_from_perf_id().
  sh: lockless get_user_pages_fast()
  sh64: _PAGE_SPECIAL support.
  sound: sh: ctrl_in/outX to __raw_read/writeX conversion.
  sh: disable deprecated genirq support.
  sh: update show_interrupts() for irq_data chip lookup.
  sh: intc: irq_data conversion.
  sh64: irq_data conversion.
  sh64: update for IRQ flag handling naming changes.
  rtc: rtc-rs5c313: ctrl_in/outX to __raw_read/writeX conversion.
  sh: mach-se: irq_data conversion.
  input: hp680_ts_input: ctrl_in/outX to __raw_read/writeX conversion.
  input: jornada680_kbd: ctrl_in/outX to __raw_read/writeX conversion.
  sh: hd64461: irq_data conversion.
  sh: mach-x3proto: irq_data conversion.
  sh: mach-systemh: irq_data conversion.
  ...
2010-10-28 12:06:51 -07:00
Linus Torvalds 0851668fdd Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits)
  [media] af9015: Fix max I2C message size when used with tda18271
  [media] IR: initialize ir_raw_event in few more drivers
  [media] Guard a divide in v4l1 compat layer
  [media] imon: fix nomouse modprobe option
  [media] imon: remove redundant change_protocol call
  [media] imon: fix my egregious brown paper bag w/rdev/idev split
  [media] cafe_ccic: Configure ov7670 correctly
  [media] ov7670: allow configuration of image size, clock speed, and I/O method
  [media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016]
  [media] af9015: map DigitalNow TinyTwin v2 remote
  [media] DigitalNow TinyTwin remote controller
  [media] af9015: RC fixes and improvements
  videodev2.h.xml: Update to reflect the latest changes at videodev2.h
  [media] v4l: document new Bayer and monochrome pixel formats
  [media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028
  [media] firedtv: add parameter to fake ca_system_ids in CA_INFO
  [media] tm6000: fix a macro coding style issue
  tm6000: Remove some ugly debug code
  [media] Nova-S-Plus audio line input
  [media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers
  ...
2010-10-28 09:35:11 -07:00
Paul Mundt 815db1477a sh64: irq_data conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-27 15:38:59 +09:00
Paul Mundt 15ff2c67ab sh: mach-se: irq_data conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-27 15:30:07 +09:00
Paul Mundt 79c981283b sh: mach-x3proto: irq_data conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-27 15:11:01 +09:00
Paul Mundt 5f01038473 sh: mach-systemh: irq_data conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-27 15:09:31 +09:00
Paul Mundt d6138832ed sh: mach-microdev: irq_data conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-27 14:54:10 +09:00
Paul Mundt 2803a1c681 sh: mach-landisk: irq_data conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-27 14:53:01 +09:00
Paul Mundt 0d338071f2 sh: mach-dreamcast: irq_data conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-27 14:36:28 +09:00
Linus Torvalds 1dfd166e93 Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (110 commits)
  sh: i2c-sh7760: Replase from ctrl_* to __raw_*
  sh: clkfwk: Shuffle around to match the intc split up.
  sh: clkfwk: modify for_each_frequency end condition
  sh: fix clk_get() error handling
  sh: clkfwk: Fix fault in frequency iterator.
  sh: clkfwk: Add a helper for rate rounding by divisor ranges.
  sh: clkfwk: Abstract rate rounding helper.
  sh: clkfwk: support clock remapping.
  sh: pci: Convert to upper/lower_32_bits() helpers.
  sh: mach-sdk7786: Add support for the FPGA SRAM.
  sh: Provide a generic SRAM pool for tiny memories.
  sh: pci: Support secondary FPGA-driven PCIe clocks on SDK7786.
  sh: pci: Support slot 4 routing on SDK7786.
  sh: Fix up PMB locking.
  sh: mach-sdk7786: Add support for fpga gpios.
  sh: use pr_fmt for clock framework, too.
  sh: remove name and id from struct clk
  sh: free-without-alloc fix for sh_mobile_lcdcfb
  sh: perf: Set up perf_max_events.
  sh: perf: Support SH-X3 hardware counters.
  ...

Fix up trivial conflicts (perf_max_events got removed) in arch/sh/kernel/perf_event.c
2010-10-25 07:51:49 -07:00
Laurent Pinchart 2001f99947 [media] soc_camera: Don't use module names to load I2C modules
With the v4l2_i2c_new_subdev* functions now supporting loading modules
based on modaliases, remove the module names hardcoded in platform data
and pass a NULL module name to those functions.

All corresponding I2C modules have been checked, and all of them include
a module aliases table with names corresponding to what the soc_camera
platform data uses.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22 21:53:52 -02:00
Laurent Pinchart 2334e7902e [media] sh_vou: Don't use module names to load I2C modules
With the v4l2_i2c_new_subdev* functions now supporting loading modules
based on modaliases, remove the module names hardcoded in platform data
and pass a NULL module name to those functions.

All corresponding I2C modules have been checked, and all of them include
a module aliases table with names corresponding to what the sh_vou
platform data uses.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22 21:53:33 -02:00
Guennadi Liakhovetski 56ea510962 sh: fix clk_get() error handling
clk_get() returns an ERR_PTR(errno) on error and not NULL.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-18 20:33:10 +09:00
Arnd Bergmann 6038f373a3 llseek: automatically add .llseek fop
All file_operations should get a .llseek operation so we can make
nonseekable_open the default for future file operations without a
.llseek pointer.

The three cases that we can automatically detect are no_llseek, seq_lseek
and default_llseek. For cases where we can we can automatically prove that
the file offset is always ignored, we use noop_llseek, which maintains
the current behavior of not returning an error from a seek.

New drivers should normally not use noop_llseek but instead use no_llseek
and call nonseekable_open at open time.  Existing drivers can be converted
to do the same when the maintainer knows for certain that no user code
relies on calling seek on the device file.

The generated code is often incorrectly indented and right now contains
comments that clarify for each added line why a specific variant was
chosen. In the version that gets submitted upstream, the comments will
be gone and I will manually fix the indentation, because there does not
seem to be a way to do that using coccinelle.

Some amount of new code is currently sitting in linux-next that should get
the same modifications, which I will do at the end of the merge window.

Many thanks to Julia Lawall for helping me learn to write a semantic
patch that does all this.

===== begin semantic patch =====
// This adds an llseek= method to all file operations,
// as a preparation for making no_llseek the default.
//
// The rules are
// - use no_llseek explicitly if we do nonseekable_open
// - use seq_lseek for sequential files
// - use default_llseek if we know we access f_pos
// - use noop_llseek if we know we don't access f_pos,
//   but we still want to allow users to call lseek
//
@ open1 exists @
identifier nested_open;
@@
nested_open(...)
{
<+...
nonseekable_open(...)
...+>
}

@ open exists@
identifier open_f;
identifier i, f;
identifier open1.nested_open;
@@
int open_f(struct inode *i, struct file *f)
{
<+...
(
nonseekable_open(...)
|
nested_open(...)
)
...+>
}

@ read disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{
<+...
(
   *off = E
|
   *off += E
|
   func(..., off, ...)
|
   E = *off
)
...+>
}

@ read_no_fpos disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{
... when != off
}

@ write @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{
<+...
(
  *off = E
|
  *off += E
|
  func(..., off, ...)
|
  E = *off
)
...+>
}

@ write_no_fpos @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{
... when != off
}

@ fops0 @
identifier fops;
@@
struct file_operations fops = {
 ...
};

@ has_llseek depends on fops0 @
identifier fops0.fops;
identifier llseek_f;
@@
struct file_operations fops = {
...
 .llseek = llseek_f,
...
};

@ has_read depends on fops0 @
identifier fops0.fops;
identifier read_f;
@@
struct file_operations fops = {
...
 .read = read_f,
...
};

@ has_write depends on fops0 @
identifier fops0.fops;
identifier write_f;
@@
struct file_operations fops = {
...
 .write = write_f,
...
};

@ has_open depends on fops0 @
identifier fops0.fops;
identifier open_f;
@@
struct file_operations fops = {
...
 .open = open_f,
...
};

// use no_llseek if we call nonseekable_open
////////////////////////////////////////////
@ nonseekable1 depends on !has_llseek && has_open @
identifier fops0.fops;
identifier nso ~= "nonseekable_open";
@@
struct file_operations fops = {
...  .open = nso, ...
+.llseek = no_llseek, /* nonseekable */
};

@ nonseekable2 depends on !has_llseek @
identifier fops0.fops;
identifier open.open_f;
@@
struct file_operations fops = {
...  .open = open_f, ...
+.llseek = no_llseek, /* open uses nonseekable */
};

// use seq_lseek for sequential files
/////////////////////////////////////
@ seq depends on !has_llseek @
identifier fops0.fops;
identifier sr ~= "seq_read";
@@
struct file_operations fops = {
...  .read = sr, ...
+.llseek = seq_lseek, /* we have seq_read */
};

// use default_llseek if there is a readdir
///////////////////////////////////////////
@ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier readdir_e;
@@
// any other fop is used that changes pos
struct file_operations fops = {
... .readdir = readdir_e, ...
+.llseek = default_llseek, /* readdir is present */
};

// use default_llseek if at least one of read/write touches f_pos
/////////////////////////////////////////////////////////////////
@ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read.read_f;
@@
// read fops use offset
struct file_operations fops = {
... .read = read_f, ...
+.llseek = default_llseek, /* read accesses f_pos */
};

@ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write.write_f;
@@
// write fops use offset
struct file_operations fops = {
... .write = write_f, ...
+	.llseek = default_llseek, /* write accesses f_pos */
};

// Use noop_llseek if neither read nor write accesses f_pos
///////////////////////////////////////////////////////////

@ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
identifier write_no_fpos.write_f;
@@
// write fops use offset
struct file_operations fops = {
...
 .write = write_f,
 .read = read_f,
...
+.llseek = noop_llseek, /* read and write both use no f_pos */
};

@ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write_no_fpos.write_f;
@@
struct file_operations fops = {
... .write = write_f, ...
+.llseek = noop_llseek, /* write uses no f_pos */
};

@ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
@@
struct file_operations fops = {
... .read = read_f, ...
+.llseek = noop_llseek, /* read uses no f_pos */
};

@ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
@@
struct file_operations fops = {
...
+.llseek = noop_llseek, /* no read or write fn */
};
===== End semantic patch =====

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Julia Lawall <julia@diku.dk>
Cc: Christoph Hellwig <hch@infradead.org>
2010-10-15 15:53:27 +02:00
Paul Mundt d8d6b902b8 sh: mach-sdk7786: Add support for the FPGA SRAM.
This ties in the 2KiB of FPGA SRAM in to the generic SRAM pool.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-15 02:13:04 +09:00
Paul Mundt b6b77b2d5f sh: pci: Support secondary FPGA-driven PCIe clocks on SDK7786.
The SDK7786 FPGA has secondary control over the PCIe clocks, specifically
relating to the slots and oscillator. This ties the FPGA clocks in to the
clock framework and balances the refcounting similar to how the primary
on-chip clocks are managed. While the on-chip clocks are per-port, the
FPGA clock enable/disable is global for the entire block.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-14 08:44:55 +09:00
Paul Mundt 47da88f366 sh: mach-sdk7786: Add support for fpga gpios.
The sdk7786 FPGA supports a number of user settable input switches that
are otherwise unused. This wires up a dummy gpio chip for the switch bank
to simply expose them to userspace.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-14 03:04:44 +09:00
Kulikov Vasiliy 5a30d7bfcd sh: boards/mach-x3proto: gpio: fix error handling code
Checks for (irq < 0) and (ilsel < 0) didn't make sense since they were
unsigned.  Made them signed.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-12 00:34:42 +09:00
Guennadi Liakhovetski 46f12936fd sh: fix an ms7724se compile breakage
Fix a compile breakage, caused by my own careless copy-paste.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-06 20:24:21 +09:00
Paul Mundt 3bccf534f9 sh: mach-x3proto: Improve ILSEL debugging.
At the moment ILSEL blows up with a BUG when aliased sets are handed in,
but as the enable call is able to hand back errors we opt for that path
instead. None of the ILSEL peripherals are vital to the board's
operation, so trapping a BUG is a bit excessive.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-04 03:07:49 +09:00
Paul Mundt 2c237329f7 sh: mach-x3proto: gpio-keys support.
This adds gpio-keys mappings for the button matrix on the baseboard,
now that we have support for the pin controller.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-04 03:00:49 +09:00
Paul Mundt 550591143e sh: mach-x3proto: Support for baseboard GPIOs.
This adds trivial support for the GPIOs implemented through the baseboard
CPLD, used for driving the button matrix.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-04 02:59:29 +09:00
Paul Mundt d39d0ed196 sh: mach-x3proto: Move the ilsel header to a better place.
We'll be adding more headers for this board, so move this over to its own
directory.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-04 02:50:32 +09:00
Paul Mundt 4bacd796cc sh: Support early IRQ vector map reservation for delayed controllers.
Some controllers will need to be initialized lazily due to pinmux
constraints, while others may simply have no need to be brought online if
there are no backing devices for them attached. In this case it's still
necessary to be able to reserve their hardware vector map before dynamic
IRQs get a hold of them.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-02 22:02:07 +09:00
Paul Mundt 5d75b3a247 Revert "sh: ecovec24: modify tsc2007 platform settings"
According to Morimoto-san, this is no longer needed. Revert it.

This reverts commit e0009b0a44.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14 18:26:38 +09:00
Kuninori Morimoto e0009b0a44 sh: ecovec24: modify tsc2007 platform settings
This patch modify x_plate_ohms to correct value for tsc2007 panel,
and removed un-necessary ts_get_pendown_state()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14 17:35:57 +09:00
Guennadi Liakhovetski 44432407d9 fbdev: sh_mobile_lcdcfb: Support multiple video modes in platform data
This is a preparation for HDMI hotplug support. This patch just moves all
platform defined video modes for the sh_mobile_lcdcfb driver to separate
arrays and switches all users to use element 0 of that array, so, this patch
doesn't introduce any functional changes and as such should not cause any
regressions.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14 17:22:38 +09:00
Paul Mundt bbcf6e8b66 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
	arch/sh/include/asm/Kbuild
	drivers/Makefile

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-08-16 13:32:24 +09:00
Russell King 500b9fc922 Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/genesis-2.6 into devel-stable
Conflicts:
	drivers/net/irda/sh_irda.c
2010-08-06 18:13:19 +01:00
Guennadi Liakhovetski c243939817 sh: add a parameter to LCDC driver's .display_on() callback
HDMI support for the sh_mobile_lcdc framebuffer driver will require a 'struct
fb_info *' pointer for its .display_on() callback. While at it fix kfr2r09
framebuffer modular build.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-08-04 16:12:11 +09:00
Guennadi Liakhovetski ace6e9799f V4L/DVB: mediabus: fix ambiguous pixel code names
Endianness notation is meaningless for 8 bit YUYV codes. Switch pixel code
names to explicitly state the order of colour components in the data
stream.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 16:43:36 -03:00
Yoshihiro Shimoda 36239c6704 sh: add sh7757lcr board support
This adds preliminary support for the sh7757lcr board.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-07-06 17:38:32 +09:00
Hitoshi Mitake 3a59826443 sh: SH-2007 board support.
This patch series adds support for ITO Co., Ltd.'s SH-2007 reference
platform (A PC-104 based SH7780 platform).

This is a direct port of the out-of-tree board support from the vendor's
kernel, originally located at:

	http://ms-n.org/sh-linux/kernel/

More information on the board and the vendor can be obtained from the
vendor's site at:

	http://www.itonet.co.jp/

Presently supported peripherals are CF and ethernet, with support for
the on-board IDE still pending further testing.

Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Reviewed-by: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-06-21 15:10:51 +09:00
Huang Weiyi 42edb1d306 sh: remove duplicated #include
Remove duplicated #include('s) in
  arch/sh/boards/mach-ecovec24/setup.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-06-07 11:38:54 +09:00
Kuninori Morimoto 560526f161 sh: make sure static declaration on ms7724se
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-06-02 17:13:57 +09:00
Kuninori Morimoto 30e0cc1ae0 sh: make sure static declaration on mach-migor
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-06-02 17:13:52 +09:00
Kuninori Morimoto 3ce0933437 sh: make sure static declaration on mach-ecovec24
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-06-02 17:13:47 +09:00
Kuninori Morimoto f4cdd757be sh: make sure static declaration on mach-ap325rxa
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-06-02 17:13:42 +09:00
Paul Mundt 019e2574f9 Merge branch 'sh/iomap' 2010-06-02 16:32:12 +09:00
Paul Mundt 861160bfd0 sh: PIO disabling for x3proto and urquell.
urquell only provides PIO in the PCI case, while the x3proto board never
had a working PCIe controller, so it can simply disable it outright.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-06-02 16:31:46 +09:00
Paul Mundt 242239715c sh: mach-sdk7786: conditionally disable PIO support.
SDK7786 only supports PIO via the PCI I/O space, so we disable PIO
completely for the non-PCI case.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-06-02 16:31:44 +09:00
Yusuke Goda 1238c68432 sh: Add support MMCIF for ecovec
This patch adds MMCIF platform data for the Ecovec board.

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-31 13:10:09 +09:00
Huang Weiyi a41a7b9177 sh: remove duplicated #include
Remove duplicated #include('s) in
  arch/sh/boards/mach-ecovec24/setup.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-26 16:03:24 +09:00
Guennadi Liakhovetski 8f4b3036d1 sh: disable SD-card write-protection detection on kfr2r09
kfr2r09 board has a micro-SD card slot, therefore card write-protection
detection cannot work there, disable it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-22 17:05:21 +09:00
Guennadi Liakhovetski 65a1b0347a sh: Add SDHI DMA support to migor
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-22 16:51:19 +09:00
Guennadi Liakhovetski 9e526bc70a sh: Add SDHI DMA support to kfr2r09
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-22 16:51:19 +09:00
Guennadi Liakhovetski 470ef1a718 sh: Add SDHI DMA support to ms7724se
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-22 16:51:18 +09:00
Guennadi Liakhovetski 815f1995f0 sh: Add SDHI DMA support to ecovec
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-22 16:51:18 +09:00
Guennadi Liakhovetski 2d15124828 sh: add Video Output Unit (VOU) and AK8813 TV-encoder support to ms7724se
Add platform bindings, GPIO initialisation and allocation and AK8813 reset code
to ms7724se.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-22 16:44:57 +09:00
Guennadi Liakhovetski aee5ab0bbd sh: add Video Output Unit and AK8813 video encoder support on ecovec
Ecovec uses the AK8813 video envoder similarly to the ms7724se platform with
the only difference, that on ecovec GPIOs are used for resetting and powering
up and down the chip.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-22 16:42:15 +09:00
Kuninori Morimoto 03c5ecd13c sh: Check return value of clk_get on ms7724
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:39:39 +09:00
Kuninori Morimoto 1030585363 sh: Check return value of clk_get on ecovec24
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:39:31 +09:00
Magnus Damm 67bbabbc86 sh: switch boards to clkdev
This patch converts the remaining board clocks
to use clkdev for lookup if needed. The unused
name and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:38:07 +09:00
Paul Mundt 3366e3585f sh: Move platform smp ops in to their own structure.
This cribs the MIPS plat_smp_ops approach for wrapping up the platform
ops. This will allow for mixing and matching different ops on the same
platform in the future.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-04-21 12:23:25 +09:00
Paul Mundt d9c944463d sh: mach-sdk7786: pm_power_off support.
This wires up power-off support for the SDK7786 board.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-04-19 16:27:47 +09:00
Kuninori Morimoto bec9fb072f sh: ms7724: Add tiny-document for sound
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-23 13:19:34 +09:00
Kuninori Morimoto b230eb32c8 sh: mach-ecovec24: Add i2c_put_adapter on sh_eth_init
i2c_put_adapter is needed after i2c_get_adapter

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-23 13:19:31 +09:00
Paul Mundt 7d0b0a4434 sh: Fix up ctrl_read/write stragglers in migor setup.
ctrl_read/writeX are deprecated, this converts them over to their
__raw_read/write() counterparts.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-02 11:52:28 +09:00
Guennadi Liakhovetski 920925f90f sh: audio support for the sh7722 Migo-R board
Configure SIU port B pins and register the WM8978 audio codec.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-02 11:08:54 +09:00
Linus Torvalds 2b8c70b217 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (362 commits)
  V4L-DVB: cx88-dvb: remove extra attribution for core
  V4L/DVB: v4l: soc_camera: fix bound checking of mbus_fmt[] index
  V4L/DVB: Add support for SMT7020 to cx88
  V4L/DVB: radio-si470x: Use UTF-8 encoding on a comment
  V4L/DVB: MAINTAINERS: Telegent tlg2300 section fix
  V4L/DVB: gspca_stv06xx: Add support for camera button
  V4L/DVB: gspca_ov519: add support for the button on ov511 based cams
  V4L/DVB: gspca_ov519: Add support for the button on ov518 based cams
  V4L/DVB: gspca_ov519: add support for the button on ov519 based cams
  V4L/DVB: gspca_main: Fix a compile error when CONFIG_INPUT is not set
  V4L/DVB: gspca_main: some input error handling fixes
  V4L/DVB: gspca_main: Allow use of input device creation code for non int. inputs
  V4L/DVB: gspca_pac7302: much improved exposure control
  V4L/DVB: gspca_sonixb: Make sonixb driver handle pas106 and pas202 cameras
  V4L/DVB: gspca_sonixb: pas106: fixup bright ctrl and add gain and exposure ctrls
  V4L/DVB: Documentation: gspca.txt: update known mr97310a cams
  V4L/DVB: gspca_mr97310a: add support for the Sakar 1638x CyberPix
  V4L/DVB: gscpa_sonixb: limit ov7630 max framerate at 640x480
  V4L/DVB: gspca_sonixb: pas202: fixup brightness ctrl and add gain and exposure ctrls
  V4L/DVB: gscpa_sonixb: Differentiate between sensors with a coarse and fine expo ctrl
  ...
2010-02-26 17:16:20 -08:00
Kuninori Morimoto 3675c750cf soc-camera: ov772x: Modify buswidth control
This patch removes "buswidth" struct member, and sets the default buswidth
to the natively supported 10 bit. You can select 8 bit buswidth by new flag.
This patch also modify ap325rxa/migor setup.c

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:00 -03:00
Magnus Damm b5f5fe80fa sh: remove dead LED code for migo-r and ms7724se
CONFIG_PM is always set on SH-Mobile these days so
get rid of the unused LED setup code.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-26 15:30:09 +09:00
Magnus Damm 6b3b55750b sh: ecovec build fix for CONFIG_I2C=n
Allow building the ecovec board support code
even though I2C support is disabled.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-26 15:30:08 +09:00
Magnus Damm 2839bd61f6 sh: ecovec r-standby support
This patch adds board specific r-standby resume code
for ecovec.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-26 15:29:28 +09:00
Magnus Damm b67cf2848a sh: ms7724se r-standby support
This patch adds board specific r-standby resume code
for ms7724se.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-26 15:29:27 +09:00
Kuninori Morimoto 29463c28a5 sh: ms7724: modify scan_timing for KEYSC
KEYSC::SCN register of SH7724 is 3bit.
Thus, scan_timing should be 0 - 7 here.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-25 16:31:29 +09:00
Kuninori Morimoto bbb892aac4 sh: ms7724: Add sh_sir support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-25 16:31:28 +09:00
Kuninori Morimoto 2636571685 sh: mach-ecovec24: Add sh_sir support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-25 16:31:28 +09:00
Kuninori Morimoto 16afc9fb02 sh: sh7724: Update FSI/SPU2 clock
When FSI and Network (= NFS file system) were used at the same time,
the I/O of FSI was unstable.  This patch updates the SPU2 clock (which
is used for FSI) to solve this issue.  Special thanks to Jeremy.

Signed-off-by: Jeremy Baker <Jeremy.Baker@renesas.com>
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-22 19:14:18 +09:00
Magnus Damm 6f26d19fce sh: always enable sh7724 vpu_clk and set to 166MHz on Ecovec
Update the sh7724 processor code to always enable vpu_clk.

On the Ecovec board, set the vpu_clk to 166 Mhz.

The 166MHz setting results in a divide-by-6 setup for
vpu_clk and improves the VPU performance compared to the
power-on-reset/bootloader configuration.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-22 19:11:23 +09:00
Magnus Damm 3844eadcfd sh: sh7724/Ecovec24/KFR2R09/MS7724SE SDHI vector merge
Merge the SDHI vectors in the sh7724 INTC table
and update the SDHI platform data for Ecovec24,
KFR2R09 and MS7724SE.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-09 18:24:30 +09:00
Magnus Damm e3e80046e0 sh: sh7723/AP325 SDHI vector merge
Merge the SDHI vectors in the sh7723 INTC table
and update the SDHI platform data for AP325.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-09 18:24:30 +09:00
Magnus Damm 8d9adabac3 sh: sh7722/Migo-R SDHI vector merge
Merge the SDHI vectors in the sh7722 INTC table
and update the SDHI platform data for Migo-R.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-09 18:24:29 +09:00
Paul Mundt deb9b22b89 sh: mach-dreamcast: Convert to sparseirq.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-02 18:01:55 +09:00
Paul Mundt c7a967273a sh: mach-se: Convert SH7724 solution engine FPGA to sparseirq.
This uses the new create_irq_nr() to build up the FPGA's desired virtual
IRQ mapping and permits us to finally flip on sparseirq for this board.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-02 17:38:04 +09:00
Paul Mundt 9d3f1881ab Merge branch 'sh/stable-updates' 2010-02-02 11:33:45 +09:00
Paul Mundt 97b19778ee sh: mach-se: Fix up irq_desc reference.
The irq_desc needs to be accessed with irq_to_desc(), this fixes up a
build error with irq_desc being undefined.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-30 11:04:38 +09:00
Paul Mundt f655f5e956 sh: mach-titan: Kill off unused PIO port mangling.
Nothing is using this, kill it off. Fixing up access sizes can be done
with trapped I/O for anyone wanting to make use of this for devices that
need it, everything else is already pure MMIO.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-28 15:08:21 +09:00
Paul Mundt 9d56dd3b08 sh: Mass ctrl_in/outX to __raw_read/writeX conversion.
The old ctrl in/out routines are non-portable and unsuitable for
cross-platform use. While drivers/sh has already been sanitized, there
is still quite a lot of code that is not. This converts the arch/sh/ bits
over, which permits us to flag the routines as deprecated whilst still
building with -Werror for the architecture code, and to ensure that
future users are not added.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-26 12:58:40 +09:00
Paul Mundt d9116d07f6 sh: mach-sdk7786: Probe system FPGA area mapping.
This implements dynamic probing for the system FPGA. The system reset
controller contains a fixed magic read word in order to identify the
FPGA. This just utilizes a simple loop that scans across all of the fixed
physical areas (area 0 through area 6) to locate the FPGA.

The FPGA also contains register information detailing the area mappings
and chip select settings for all of the other blocks, so this needs to be
done before we can set up anything else.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-20 18:25:19 +09:00
Paul Mundt b51989b8af sh: mach-sdk7786: reset controller reboot support.
This wires up the machine_ops reboot call to use the system reset
controller.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-20 16:53:11 +09:00
Paul Mundt 5f240718b4 sh: mach-sdk7786: Split out FPGA IRQ controller setup.
This moves out the FPGA IRQ controller setup code to its own file, in
preparation for switching off of IRL mode and having it provide its own
irq_chip.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-20 15:23:54 +09:00
Paul Mundt efd590d57a sh: mach-sdk7786: FPGA updates.
This does a bit of refactoring of the FPGA management code. The primary
FPGA initialization is moved out to its own file in preparation for
implementing some of the more complex capabilities, a complete set of
register definitions is provided, and all of the existing users in the
board code are moved over to use the new interface instead of setting up
overlapping mappings. This also corrects the FPGA size, which previously
was chomped off at the SDIF control register.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-20 15:08:36 +09:00
Paul Mundt 14965f16b4 sh: Fix up sdk7780 and urquell builds.
These two got broken in the heartbeat private data conversion,
fix them up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-19 20:10:33 +09:00
Paul Mundt dea3cf1c39 sh: urquell: Handle EXTAL configuration here, too.
urquell happens to use the same mode pins and EXTAL configuration as
SDK7786, so just copy it over.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-19 20:09:28 +09:00
Paul Mundt c809821827 sh: mach-sdk7786: Detect/configure/propagate EXTAL.
This uses the mode pins exposed through the FPGA to work out whether
we're driven from EXTAL or not and does the appropriate setup and
propagation through the clock framework.

This will also -EINVAL out for anyone adding in their own oscillators,
forcing proper configuration with the clock framework instead of
proceeding on with bogus clock values.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-19 19:38:36 +09:00
Paul Mundt f33609344a sh: Convert p3_ioremap() users to ioremap_prot().
This kills off the ancient p3_ioremap(), converting over to the more
generic ioremap_prot() instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-19 13:55:41 +09:00
Paul Mundt d57d64080d sh: Prevent 64-bit pgprot clobbering across ioremap implementations.
Presently 'flags' gets passed around a lot between the various ioremap
helpers and implementations, which is only 32-bits. In the X2TLB case
we use 64-bit pgprots which presently results in the upper 32bits being
chopped off (which handily include our read/write/exec permissions).

As such, we convert everything internally to using pgprot_t directly and
simply convert over with pgprot_val() where needed. With this in place,
transparent fixmap utilization for early ioremap works as expected.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-19 13:34:38 +09:00
Paul Mundt 0c54de146e Merge branch 'sh/stable-updates' 2010-01-18 20:47:37 +09:00
Kuninori Morimoto c718aff2e6 sh: ms7724: Correct sh-eth EEPROM polling timeout.
This converts the cpu_relax() to a udelay(1), which fixes up issues with
the EEPROM polling occasionally timing out.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-18 20:47:15 +09:00
Matt Fleming 6f82b6ebb1 sh: Use ioremap_fixmed to map the SM501 DRAM config register
We need to write to the DRAM config register very early and at such an
early stage ioremap() is not available. So use ioremap_fixed() to map
the register.

The reason that we are avoiding using the legacy P2 mapping is that
there will come a day when the legacy P2 mappings no longer exist.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
2010-01-16 14:31:44 +00:00
Paul Mundt 7dcaa8e8e6 sh: Generalize SH7786 PCIe support.
Previously this was only built in for Urquell boards, but the same
approach can be used on SDK7786 now that the mode pin reading is
supported, so make it generic to SH7786.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-15 19:13:56 +09:00
Paul Mundt 6f832e8aab sh: mach-sdk7786: mode pins support.
This wires up the mode pins support on the SDK7786. The pins are
standard SH7786 pins, and all are fixed in software. Needed for the
clock framework, PCIe, and so forth.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-15 16:31:04 +09:00
Paul Mundt a09d2831b3 sh: heartbeat: Update boards for access size hinting.
This updates the existing boards that specify the register width through
platform data to use the resource flags instead. This eliminates platform
data completely in most cases, and permits further improvement in the
heartbeat driver as well as shrinking the overall private data size.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-15 12:24:34 +09:00
Paul Mundt 2267c7875b sh: mach-sdk7786: heartbeat support.
Hand off the user LEDs to the heartbeat driver.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-15 12:11:30 +09:00
NISHIMOTO Hiroki ea44078341 sh: mach-ecovec24: Add motion sensor driver support.
This patch adds support for the lis3lv02d motion sensor connected via
i2c on the Ecovec board. Tested with evtest.

Signed-off-by: NISHIMOTO Hiroki <nishimoto.hiroki@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-15 08:25:00 +09:00
Paul Mundt 02bf6cc72c sh: Preliminary SDK7786 board support.
This stubs in some preliminary board support for the RTE SDK7786.

This is quite stunted at the moment, and primarily builds on top of the
system FPGA. FPGA IRQs are handled via CPU IRL masking for simplicity,
with initial peripheral support restricted to the debug ethernet.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-14 20:58:58 +09:00
Paul Mundt 53e6d8e006 sh: mach-se: Convert SE7343 FPGA to dynamic IRQ allocation.
This gets rid of the arbitrary set of vectors used by the SE7722 FPGA
interrupt controller and switches over to a completely dynamic set.
No assumptions regarding a contiguous range are made, and the platform
resources themselves need to be filled in lazily.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-12 13:37:04 +09:00