[PATCH 10/13] mac68k: start CUDA early

2009-11-03 Thread Finn Thain
The valkyriefb driver needs the CUDA to work in order to set the video mode at boot. Initialising the device earlier, and bring the m68k code closer to the powermac code. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/m68k/mac/config.c |6 drivers/macintosh/via

[PATCH 3/13] pmac-zilog: cleanup

2009-11-03 Thread Finn Thain
Whitespace cleanups and comment typo fix. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/serial/pmac_zilog.c | 85 +--- drivers/serial/pmac_zilog.h | 20 +- 2 files changed, 51 insertions(+), 54 deletions(-) Index: linux

[PATCH 4/13] pmac-zilog, mac68k: replace mac68k SCC code with platform device

2009-11-03 Thread Finn Thain
-by: Finn Thain fth...@telegraphics.com.au --- arch/m68k/Kconfig |6 arch/m68k/configs/mac_defconfig |7 arch/m68k/configs/multi_defconfig |6 arch/m68k/include/asm/machw.h | 25 -- arch/m68k/include/asm/macints.h | 22 -- arch/m68k/mac/Makefile

Re: [PATCH 3/13] pmac-zilog: cleanup

2009-11-16 Thread Finn Thain
Hi Ben, On Tue, 17 Nov 2009, Benjamin Herrenschmidt wrote: On Wed, 2009-11-04 at 00:40 +1100, Finn Thain wrote: Whitespace cleanups and comment typo fix. Signed-off-by: Finn Thain fth...@telegraphics.com.au Acked-by: Benjamin Herrenschmidt b...@kernel.crashing.org Hi Finn. Do you

[PATCH 10/13] mac68k: start CUDA early, take 2

2009-11-17 Thread Finn Thain
The valkyriefb driver needs the CUDA to work in order to set the video mode at boot. So initialise the device earlier, and bring the m68k code closer to the powermac code. Take 2 was changed as per Benjamin Herrenschmidt's review. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch

[PATCH 1/2] pmac-zilog: add platform driver

2009-11-17 Thread Finn Thain
with platform. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/m68k/configs/mac_defconfig |5 + arch/m68k/configs/multi_defconfig |5 + drivers/serial/Kconfig| 12 +- drivers/serial/pmac_zilog.c | 159 +- drivers/serial

Re: [patch 10/10] m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible

2007-08-13 Thread Finn Thain
On Mon, 13 Aug 2007, Michael Schmitz wrote: From: Geert Uytterhoeven [EMAIL PROTECTED] m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible With buttons emulation being available via uinput event devices, do we still need the kernel mouse button emulation? At least on

Re: [PATCH 1/2] pmac-zilog: add platform driver

2010-01-02 Thread Finn Thain
On Sat, 2 Jan 2010, Geert Uytterhoeven wrote: On Tue, Nov 17, 2009 at 10:04, Finn Thain fth...@telegraphics.com.au wrote: Add platform driver to the pmac-zilog driver for mac 68k, putting the powermac-specific bits inside #ifdef CONFIG_PPC_PMAC. --- linux-2.6.31.orig/drivers/serial

[PATCH 1/2] pmac-zilog: add platform driver, version 3

2010-01-10 Thread Finn Thain
Add platform driver support to the pmac-zilog driver, for m68k macs. Place the powermac-specific code inside #ifdef CONFIG_PPC_PMAC. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This patch should be applied after [PATCH 3/13] pmac-zilog: cleanup. It obsoletes [PATCH 4/13] pmac-zilog

CONFIG_BOOTX_TEXT breaks PowerBook 3400 with BootX

2008-08-19 Thread Finn Thain
Hi All, When I build kernels with CONFIG_BOOTX_TEXT enabled I can't boot a PB 3400 with BootX. I get a black screen with Welcome to Linux at the top, then it appears to hang. Debian kernels are configured this way and suffer the same problem. I don't know if Quik is affected. It is a bit of

Re: CONFIG_BOOTX_TEXT breaks PowerBook 3400 with BootX

2008-08-20 Thread Finn Thain
On Wed, 20 Aug 2008, Benjamin Herrenschmidt wrote: On Wed, 2008-08-20 at 03:23 +1000, Finn Thain wrote: ... The Debian Sarge 2.6.8-4 kernel does not seem to have this problem though kernel.org 2.6.16 and later versions do. Any ideas? How late have you tried ? I remember fixing

Re: [PATCH 1/2 v3]Update broken web addresses.

2010-09-21 Thread Finn Thain
On Tue, 21 Sep 2010, Justin P. Mattock wrote: Below is an update from the original, with changes to the broken web addresses and removal of archive.org and moved to a seperate patch for you guys to decide if you want to use this and/or just leave the old url in and leave it at that..

[PATCH 01/16] pmac_zilog: fix unexpected irq

2011-10-23 Thread Finn Thain
out of __pmz_startup() and placing it into a seperate routine. A similar problem arises when the irq is freed. Fix this by resetting the chip first (on m68k mac). Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This patch has been tested on a variety of m68k Macs but no PowerMacs

[PATCH 01/16] pmac_zilog: fix unexpected irq

2011-11-24 Thread Finn Thain
out of __pmz_startup() and placing it into a seperate routine. A similar problem arises when the irq is freed. Fix this by resetting the chip first (on m68k mac). Signed-off-by: Finn Thain fth...@telegraphics.com.au Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org --- This patch has been

Re: [PATCH 01/16] pmac_zilog: fix unexpected irq

2011-11-24 Thread Finn Thain
On Thu, 24 Nov 2011, Alan Cox wrote: Given the change should work for all hardware do we really need the ifdefs. Far better I would have thought to just change it so we don't have to maintain what is effectively two versions of the code between now and 2038. I agree. So no ack from

[PATCH 01/16 v2] pmac_zilog: fix unexpected irq

2011-12-06 Thread Finn Thain
into a separate pmz_interrupt_control() routine. Replace all instances of these operations with calls to this routine. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Re-implemented since v1 using a simpler approach that avoids messing with the Master Interrupt Enable bit. As well

Re: [PATCH 01/16 v2] pmac_zilog: fix unexpected irq

2011-12-06 Thread Finn Thain
On Tue, 6 Dec 2011, Geert Uytterhoeven wrote: Hi Finn, On Tue, Dec 6, 2011 at 16:13, Finn Thain fth...@telegraphics.com.au wrote: +static void pmz_interrupt_control(struct uart_pmac_port *uap, int enable) +{ +       if (enable) { +               uap-curregs[1] |= INT_ALL_Rx

[PATCH 01/16 v3] pmac_zilog: fix unexpected irq

2011-12-06 Thread Finn Thain
flipping into a separate pmz_interrupt_control() routine. Replace all instances of these operations with calls to this routine. Omit the zssync() calls that seem to serve no purpose. Signed-off-by: Finn Thain fth...@telegraphics.com.au Acked-by: Alan Cox a...@linux.intel.com --- Re-implemented

Re: [PATCH 01/16 v3] pmac_zilog: fix unexpected irq

2011-12-08 Thread Finn Thain
On Thu, 8 Dec 2011, Benjamin Herrenschmidt wrote: On Thu, 2011-12-08 at 15:20 +1100, Benjamin Herrenschmidt wrote: So basic operations seem to work, I've applied the patch to powerpc-next. Then I guess Geert should not push this for 3.3 -- or does it make no difference? However, the

Re: [PATCH 01/16 v3] pmac_zilog: fix unexpected irq

2011-12-12 Thread Finn Thain
On Mon, 12 Dec 2011, Benjamin Herrenschmidt wrote: Any chance you can test this patch ? I would not be surprised if it broke m68k since I had to do some of the changes in there blind, so let me know... with this, I can again suspend/resume properly on a Pismo while using the internal

Re: [PATCH 01/16 v3] pmac_zilog: fix unexpected irq

2011-12-12 Thread Finn Thain
On Tue, 13 Dec 2011, Benjamin Herrenschmidt wrote: On Tue, 2011-12-13 at 00:34 +1100, Finn Thain wrote: On Mon, 12 Dec 2011, Benjamin Herrenschmidt wrote: Any chance you can test this patch ? I would not be surprised if it broke m68k since I had to do some of the changes

Re: nvram and generic_nvram modules are problematic, was Re: [PATCH] arch: m68k: mac: misc.c: Remove some unused functions

2015-02-02 Thread Finn Thain
On Sun, 1 Feb 2015, Geert Uytterhoeven wrote: On Sun, Feb 1, 2015 at 4:39 AM, Finn Thain wrote: On Sun, 4 Jan 2015, Geert Uytterhoeven wrote: On Sun, Jan 4, 2015 at 8:21 AM, Finn Thain wrote: On Thu, 1 Jan 2015, Rickard Strandqvist wrote: Removes some functions that are not used

Re: nvram and generic_nvram modules are problematic, was Re: [PATCH] arch: m68k: mac: misc.c: Remove some unused functions

2015-02-02 Thread Finn Thain
On Sun, 1 Feb 2015, Russell King - ARM Linux wrote: On Sun, Feb 01, 2015 at 02:39:42PM +1100, Finn Thain wrote: I find the ARM support in drivers/char/nvram to be surprising, not to say questionable. The /proc/driver/nvram implementation, given defined(__arm__), decodes the NVRAM

nvram and generic_nvram modules are problematic, was Re: [PATCH] arch: m68k: mac: misc.c: Remove some unused functions

2015-01-31 Thread Finn Thain
On Sun, 4 Jan 2015, Geert Uytterhoeven wrote: On Sun, Jan 4, 2015 at 8:21 AM, Finn Thain fth...@telegraphics.com.au wrote: On Thu, 1 Jan 2015, Rickard Strandqvist wrote: Removes some functions that are not used anywhere: mac_pram_write() mac_pram_read() ... I'd rather not remove all

Re: [RFC 24/24] m68k: Dispatch nvram_ops calls to Atari or Mac functions

2015-06-02 Thread Finn Thain
On Mon, 1 Jun 2015, Geert Uytterhoeven wrote: Index: linux/arch/m68k/atari/nvram.c === --- linux.orig/arch/m68k/atari/nvram.c 2015-05-31 11:01:21.0 +1000 +++ linux/arch/m68k/atari/nvram.c 2015-05-31

Re: [RFC 07/24] x86/thinkpad_acpi: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2015-06-03 Thread Finn Thain
On Tue, 2 Jun 2015, Darren Hart wrote: On Tue, Jun 02, 2015 at 07:09:28AM -0300, Henrique de Moraes Holschuh wrote: Test results were sent to me privately, and they are correct, so... Finn, unless there is some compelling reason not to - like they are MBs worth of data, please

[RFC v2 01/24] macintosh/nvram: Remove as unused

2015-06-14 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au Acked-by: Geert Uytterhoeven ge...@linux-m68k.org --- drivers/macintosh/nvram.c | 130 -- 1 file changed, 130 deletions(-) Index: linux/drivers/macintosh/nvram.c

[RFC v2 02/24] scsi/atari_scsi: Dont select CONFIG_NVRAM

2015-06-14 Thread Finn Thain
the valkyriefb driver with powerpc, and since that driver uses NVRAM, it is affected by CONFIG_ATARI_SCSI, because of the use of select NVRAM. Adopt the powerpc convention on m68k to avoid surprises. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This patch temporarily disables

[RFC v2 09/24] char/nvram: Implement NVRAM read/write methods

2015-06-14 Thread Finn Thain
on the latter. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/nvram.c | 162 +++ 1 file changed, 114 insertions(+), 48 deletions(-) Index: linux/drivers/char/nvram.c

[RFC v2 23/24] m68k/mac: Fix PRAM accessors

2015-06-14 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Tested on a PowerBook 520 and Quadra 650. --- arch/m68k/mac/misc.c | 35 +-- include/uapi/linux/pmu.h |2 ++ 2 files changed, 31 insertions(+), 6 deletions(-) Index: linux/arch/m68k/mac/misc.c

[RFC v2 24/24] m68k: Dispatch nvram_ops calls to Atari or Mac functions

2015-06-14 Thread Finn Thain
A multi-platform kernel binary needs to decide at run-time how to dispatch the arch_nvram_ops calls. Add platform-independent arch_nvram_ops, for use when multiple platform-specific NVRAM ops implementations are needed. Enable CONFIG_HAVE_ARCH_NVRAM_OPS for Macs. Signed-off-by: Finn Thain fth

[RFC v2 06/24] char/nvram: Adopt arch_nvram_ops

2015-06-14 Thread Finn Thain
platforms and architectures. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- The #ifdefs here restrict the procfs and checksumming code to those architectures with PC-style RTC NVRAM. There may be a better place for that code but it's an open question. See https://lkml.org/lkml/2015/2/3/22

[RFC v2 04/24] m68k/atari: Replace nvram_{read, write}_byte with arch_nvram_ops

2015-06-14 Thread Finn Thain
. Replace this validate-checksum-and-read-byte sequence with the equivalent rtc_nvram_ops.read() call and remove the now unused functions. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- The advantage of the new ops struct over the old global nvram_* functions is that the misc device module can

[RFC v2 00/24] Re-use nvram module

2015-06-14 Thread Finn Thain
The generic NVRAM module, drivers/char/generic_nvram, implements a /dev/nvram misc device. It is used only by 32-bit PowerPC platforms and isn't generic enough to be more widely used. The RTC NVRAM module, drivers/char/nvram, also implements a /dev/nvram misc device. It is used by x86, ARM and

[RFC v2 20/24] char/generic_nvram: Remove as unused

2015-06-14 Thread Finn Thain
And thus eliminate some twisted CONFIG_GENERIC_NVRAM logic. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/Makefile|6 - drivers/char/generic_nvram.c | 176 --- 2 files changed, 1 insertion(+), 181 deletions(-) Index

[RFC v2 18/24] nvram: Drop nvram_* symbol exports and prototypes

2015-06-14 Thread Finn Thain
Drivers now use the arch_nvram_ops calls so remove the function exports and prototypes. nvram_check_checksum() is unused so remove it. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/m68k/atari/nvram.c |6 +++--- drivers/char/nvram.c| 27

[RFC v2 08/24] char/nvram: Allow the set_checksum and initialize ioctls to be omitted

2015-06-14 Thread Finn Thain
-platform kernel binary can do the right thing when running on hardware without suitable NVRAM. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Changed since v1: - Don't bother acquiring the mutex for unimplemented ioctls. --- drivers/char/nvram.c | 71

[RFC v2 13/24] powerpc: Cleanup nvram includes

2015-06-14 Thread Finn Thain
The nvram_read_byte() and nvram_write_byte() definitions in asm/nvram.h duplicate those in linux/nvram.h. Get rid of the former to prepare for adoption of struct arch_nvram_ops (which is defined in linux/nvram.h for general use). Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch

[RFC v2 22/24] m68k/mac: Adopt naming and calling conventions for PRAM routines

2015-06-14 Thread Finn Thain
Adopt the existing *_read_byte and *_write_byte naming convention. Rename via_pram_readbyte and via_pram_writebyte to avoid confusion. Adjust calling conventions of mac_pram_* functions to match the arch_nvram_ops struct methods. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Changes

[RFC v2 21/24] powerpc: Adopt nvram module for PPC64

2015-06-14 Thread Finn Thain
the requested PowerMac NVRAM partition is not found. This is a userspace-visible change, in the non-existent partition case, which would be in an error path for an IOC_NVRAM_GET_OFFSET ioctl syscall. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- BTW, the IOC_NVRAM_SYNC ioctl call returns

[RFC v2 12/24] char/nvram: Add devname:nvram module alias

2015-06-14 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/nvram.c |1 + 1 file changed, 1 insertion(+) Index: linux/drivers/char/nvram.c === --- linux.orig/drivers/char/nvram.c 2015-06-14 17:45:46.0

[RFC v2 19/24] powerpc: Remove CONFIG_GENERIC_NVRAM and adopt CONFIG_HAVE_ARCH_NVRAM_OPS

2015-06-14 Thread Finn Thain
, unimplemented ioctls return -ENOTTY. Whereas, for the superseded generic_nvram module they would return -EINVAL. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This ioctl change is visible to userspace code but only in an error path. I didn't find any userspace code that uses

[RFC v2 15/24] powerpc: Implement arch_nvram_ops.get_size() and remove old nvram_* exports

2015-06-14 Thread Finn Thain
Implement arch_nvram_ops for PPC32 and make use of it in the generic_nvram misc device module so that the nvram_* function exports can be removed. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/powerpc/include/asm/nvram.h |3 --- arch/powerpc/kernel/setup_32.c | 10

[RFC v2 14/24] powerpc: Add missing ppc_md.nvram_size for CHRP and PowerMac

2015-06-14 Thread Finn Thain
and chrp_nvram_write, which break the naming convention used across PowerPC platforms for NVRAM accessor functions. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/powerpc/platforms/chrp/nvram.c | 14 ++ arch/powerpc/platforms/powermac/nvram.c |9 + 2 files changed, 19

[RFC v2 17/24] powerpc, fbdev: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2015-06-14 Thread Finn Thain
Make use of arch_nvram_ops in device drivers so that the nvram_* function exports can be removed. Since they are no longer global symbols, rename the PPC32 nvram_* functions appropriately. Add the missing CONFIG_NVRAM test to imsttfb to avoid a build failure. Signed-off-by: Finn Thain fth

[RFC v2 10/24] char/nvram: Use generic fixed_size_llseek()

2015-06-14 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/nvram.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) Index: linux/drivers/char/nvram.c === --- linux.orig/drivers/char/nvram.c

[RFC v2 05/24] char/nvram: Re-order functions to remove forward declarations and #ifdefs

2015-06-14 Thread Finn Thain
Also give functions more sensible names: nvram_misc_* for misc device ops, nvram_proc_* for proc file ops and nvram_module_* for init and exit functions. This makes them distict from nvram_ops members. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/nvram.c | 194

[RFC v2 16/24] powerpc: Implement nvram sync ioctl

2015-06-14 Thread Finn Thain
Add the powerpc-specific sync() method to struct nvram_ops and implement the corresponding ioctl in the nvram module. This allows the nvram module to replace the generic_nvram module. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- On PPC32, the IOC_NVRAM_SYNC ioctl call always returns

[RFC v2 03/24] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

2015-06-14 Thread Finn Thain
Move the m68k-specific code elsewhere to make the driver generic. Change the vmode calculation from logical OR to bitwise OR, since it is obviously wrong. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- BTW, I didn't change the SCSI ID location in NVRAM. This code says 16 whereas

[RFC v2 07/24] x86/thinkpad_acpi: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2015-06-14 Thread Finn Thain
Make use of arch_nvram_ops in the thinkpad_acpi driver so that the nvram_* function exports can be removed. This patch series was tested on a ThinkPad T43. Signed-off-by: Finn Thain fth...@telegraphics.com.au Acked-by: Henrique de Moraes Holschuh h...@hmh.eng.br Reviewed-by: Darren Hart dvh

[RFC v2 11/24] m68k/atari: Implement arch_nvram_ops methods and enable CONFIG_HAVE_ARCH_NVRAM_OPS

2015-06-14 Thread Finn Thain
Atari RTC NVRAM has a checksum so implement the remaining arch_nvram_ops methods for the set_checksum and initialize ioctls. Enable CONFIG_HAVE_ARCH_NVRAM_OPS. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This re-enables the nvram module for Atari. --- arch/m68k/Kconfig

Re: [RFC v2 23/24] m68k/mac: Fix PRAM accessors

2015-06-17 Thread Finn Thain
Hi Geert, Further to my previous email, On Tue, 16 Jun 2015, in which I wrote: On Mon, 15 Jun 2015, Geert Uytterhoeven wrote: More magic values... [...] The only useful RTC documentation I've ever come across is this: http://mac.linux-m68k.org/devel/plushw.php This document

Re: [RFC v2 23/24] m68k/mac: Fix PRAM accessors

2015-06-15 Thread Finn Thain
On Mon, 15 Jun 2015, Geert Uytterhoeven wrote: Hi Finn, On Sun, Jun 14, 2015 at 9:46 AM, Finn Thain fth...@telegraphics.com.au wrote: --- linux.orig/arch/m68k/mac/misc.c 2015-06-14 17:46:02.0 +1000 +++ linux/arch/m68k/mac/misc.c 2015-06-14 17:46:03.0 +1000

[RFC 12/24] char/nvram: Add devname:nvram module alias

2015-05-30 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/nvram.c |1 + 1 file changed, 1 insertion(+) Index: linux/drivers/char/nvram.c === --- linux.orig/drivers/char/nvram.c 2015-05-31 11:01:11.0

[RFC 11/24] m68k/atari: Implement arch_nvram_ops methods and enable CONFIG_HAVE_ARCH_NVRAM_OPS

2015-05-30 Thread Finn Thain
Atari RTC NVRAM has a checksum so implement the remaining arch_nvram_ops methods for the set_checksum and initialize ioctls. Enable CONFIG_HAVE_ARCH_NVRAM_OPS. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This re-enables the nvram module for Atari. --- arch/m68k/Kconfig

[RFC 10/24] char/nvram: Use generic fixed_size_llseek()

2015-05-30 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/nvram.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) Index: linux/drivers/char/nvram.c === --- linux.orig/drivers/char/nvram.c

[RFC 03/24] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

2015-05-30 Thread Finn Thain
Move the m68k-specific code elsewhere to make the driver generic. Change the vmode calculation from logical OR to bitwise OR, since it is obviously wrong. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- BTW, I didn't change the SCSI ID location in NVRAM. This code says 16 whereas

[RFC 09/24] char/nvram: Implement NVRAM read/write methods

2015-05-30 Thread Finn Thain
on the latter. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/nvram.c | 162 +++ 1 file changed, 114 insertions(+), 48 deletions(-) Index: linux/drivers/char/nvram.c

[RFC 02/24] scsi/atari_scsi: Dont select CONFIG_NVRAM

2015-05-30 Thread Finn Thain
the valkyriefb driver with powerpc, and since that driver uses NVRAM, it is affected by CONFIG_ATARI_SCSI, because of the use of select NVRAM. Adopt the powerpc convention on m68k to avoid surprises. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This patch temporarily disables

[RFC 22/24] m68k/mac: Adopt nvram module

2015-05-30 Thread Finn Thain
on Macs. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- The arch_nvram_ops struct can only be defined once, of course, so the Mac and Atari ops structs are mutually exclusive. The final patch will allow the two implementations to co-exist in a multi-platform kernel binary. --- arch

[RFC 04/24] m68k/atari: Replace nvram_{read, write}_byte with arch_nvram_ops

2015-05-30 Thread Finn Thain
. Replace this validate-checksum-and-read-byte sequence with the equivalent rtc_nvram_ops.read() call and remove the now unused functions. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- The advantage of the new ops struct over the old global nvram_* functions is that the misc device module can

[RFC 16/24] powerpc: Implement nvram sync ioctl

2015-05-30 Thread Finn Thain
Add the powerpc-specific sync() method to struct nvram_ops and implement the corresponding ioctl in the nvram module. This allows the nvram module to replace the generic_nvram module. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- On PPC32, the IOC_NVRAM_SYNC ioctl call always returns

[RFC 20/24] char/generic_nvram: Remove as unused

2015-05-30 Thread Finn Thain
And thus eliminate some twisted CONFIG_GENERIC_NVRAM logic. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/Makefile|6 - drivers/char/generic_nvram.c | 176 --- 2 files changed, 1 insertion(+), 181 deletions(-) Index

[RFC 00/24] Re-use nvram module

2015-05-30 Thread Finn Thain
The generic NVRAM module, drivers/char/generic_nvram, implements a /dev/nvram misc device. It is used only by 32-bit PowerPC platforms and isn't generic enough to be more widely used. The RTC NVRAM module, drivers/char/nvram, also implements a /dev/nvram misc device. It is used by x86, ARM and

[RFC 15/24] powerpc: Implement arch_nvram_ops.get_size() and remove old nvram_* exports

2015-05-30 Thread Finn Thain
Implement arch_nvram_ops for PPC32 and make use of it in the generic_nvram misc device module so that the nvram_* function exports can be removed. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/powerpc/include/asm/nvram.h |3 --- arch/powerpc/kernel/setup_32.c | 10

[RFC 24/24] m68k: Dispatch nvram_ops calls to Atari or Mac functions

2015-05-30 Thread Finn Thain
A multi-platform kernel binary needs to decide at run-time how to dispatch the arch_nvram_ops calls. Add platform-independent arch_nvram_ops, for use when multiple platform-specific NVRAM ops implementations are needed. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/m68k/Kconfig

[RFC 01/24] macintosh/nvram: Remove as unused

2015-05-30 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/macintosh/nvram.c | 130 -- 1 file changed, 130 deletions(-) Index: linux/drivers/macintosh/nvram.c === --- linux.orig

[RFC 06/24] char/nvram: Adopt arch_nvram_ops

2015-05-30 Thread Finn Thain
platforms and architectures. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- The #ifdefs here restrict the procfs and checksumming code to those architectures with PC-style RTC NVRAM. There may be a better place for that code but it's an open question. See https://lkml.org/lkml/2015/2/3/22

[RFC 17/24] powerpc, fbdev: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2015-05-30 Thread Finn Thain
Make use of arch_nvram_ops in device drivers so that the nvram_* function exports can be removed. Since they are no longer global symbols, rename the PPC32 nvram_* functions appropriately. Add the missing CONFIG_NVRAM test to imsttfb to avoid a build failure. Signed-off-by: Finn Thain fth

[RFC 18/24] nvram: Drop nvram_* symbol exports and prototypes

2015-05-30 Thread Finn Thain
Drivers now use the arch_nvram_ops calls so remove the function exports and prototypes. nvram_check_checksum() is unused so remove it. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/m68k/atari/nvram.c |6 +++--- drivers/char/nvram.c| 27

[RFC 05/24] char/nvram: Re-order functions to remove forward declarations and #ifdefs

2015-05-30 Thread Finn Thain
Also give functions more sensible names: nvram_misc_* for misc device ops, nvram_proc_* for proc file ops and nvram_module_* for init and exit functions. This makes them distict from nvram_ops members. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/nvram.c | 194

[RFC 13/24] powerpc: Cleanup nvram includes

2015-05-30 Thread Finn Thain
The nvram_read_byte() and nvram_write_byte() definitions in asm/nvram.h duplicate those in linux/nvram.h. Get rid of the former to prepare for adoption of struct arch_nvram_ops (which is defined in linux/nvram.h for general use). Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch

[RFC 21/24] powerpc: Adopt nvram module for PPC64

2015-05-30 Thread Finn Thain
the requested PowerMac NVRAM partition is not found. This is a userspace-visible change, in the non-existent partition case, which would be in an error path for an IOC_NVRAM_GET_OFFSET ioctl syscall. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- BTW, the IOC_NVRAM_SYNC ioctl call returns

[RFC 19/24] powerpc: Remove CONFIG_GENERIC_NVRAM and adopt CONFIG_HAVE_ARCH_NVRAM_OPS

2015-05-30 Thread Finn Thain
, unimplemented ioctls return -ENOTTY. Whereas, for the superseded generic_nvram module they would return -EINVAL. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This ioctl change is visible to userspace code but only in an error path. I didn't find any userspace code that uses

[RFC 23/24] m68k/mac: Fix PRAM accessors

2015-05-30 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Tested on a PowerBook 520 and Quadra 650. --- arch/m68k/mac/misc.c | 35 +-- include/uapi/linux/pmu.h |2 ++ 2 files changed, 31 insertions(+), 6 deletions(-) Index: linux/arch/m68k/mac/misc.c

[RFC 14/24] powerpc: Add missing ppc_md.nvram_size for CHRP and PowerMac

2015-05-30 Thread Finn Thain
and chrp_nvram_write, which break the naming convention used across PowerPC platforms for NVRAM accessor functions. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/powerpc/platforms/chrp/nvram.c | 14 ++ arch/powerpc/platforms/powermac/nvram.c |9 + 2 files changed, 19

[RFC 07/24] x86/thinkpad_acpi: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2015-05-30 Thread Finn Thain
Make use of arch_nvram_ops in the thinkpad_acpi driver so that the nvram_* function exports can be removed. This patch series was tested on a ThinkPad T43. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/platform/x86/thinkpad_acpi.c | 20 ++-- 1 file changed

[RFC 08/24] char/nvram: Allow the set_checksum and initialize ioctls to be omitted

2015-05-30 Thread Finn Thain
-platform kernel binary can do the right thing when running on hardware without suitable NVRAM. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/nvram.c | 61 -- include/linux/nvram.h |2 + 2 files changed, 37 insertions

Re: [RFC 07/24] x86/thinkpad_acpi: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2015-05-31 Thread Finn Thain
On Sun, 31 May 2015, Henrique de Moraes Holschuh wrote: On Sun, 31 May 2015, Finn Thain wrote: Make use of arch_nvram_ops in the thinkpad_acpi driver so that the nvram_* function exports can be removed. This patch series was tested on a ThinkPad T43. Can you describe how you did

[RFC v3 03/24] m68k/atari: Replace nvram_{read, write}_byte with arch_nvram_ops

2015-06-27 Thread Finn Thain
. Replace this validate-checksum-and-read-byte sequence with the equivalent rtc_nvram_ops.read() call and remove the now unused functions. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- The advantage of the new ops struct over the old global nvram_* functions is that the misc device module can

[RFC v3 16/24] powerpc, fbdev: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2015-06-27 Thread Finn Thain
Make use of arch_nvram_ops in device drivers so that the nvram_* function exports can be removed. Since they are no longer global symbols, rename the PPC32 nvram_* functions appropriately. Add the missing CONFIG_NVRAM test to imsttfb to avoid a build failure. Signed-off-by: Finn Thain fth

[RFC v3 17/24] nvram: Drop nvram_* symbol exports and prototypes

2015-06-27 Thread Finn Thain
Drivers now use the arch_nvram_ops calls so remove the function exports and prototypes. nvram_check_checksum() is unused so remove it. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/m68k/atari/nvram.c |6 +++--- drivers/char/nvram.c| 27

[RFC v3 10/24] m68k/atari: Implement arch_nvram_ops methods and enable CONFIG_HAVE_ARCH_NVRAM_OPS

2015-06-27 Thread Finn Thain
Atari RTC NVRAM has a checksum so implement the remaining arch_nvram_ops methods for the set_checksum and initialize ioctls. Enable CONFIG_HAVE_ARCH_NVRAM_OPS. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This re-enables the nvram module for Atari. --- arch/m68k/Kconfig

[RFC v3 07/24] char/nvram: Allow the set_checksum and initialize ioctls to be omitted

2015-06-27 Thread Finn Thain
-platform kernel binary can do the right thing when running on hardware without suitable NVRAM. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Changed since v1: - Don't bother acquiring the mutex for unimplemented ioctls. --- drivers/char/nvram.c | 71

[RFC v3 06/24] x86/thinkpad_acpi: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2015-06-27 Thread Finn Thain
Make use of arch_nvram_ops in the thinkpad_acpi driver so that the nvram_* function exports can be removed. This patch series was tested on a ThinkPad T43. Signed-off-by: Finn Thain fth...@telegraphics.com.au Acked-by: Henrique de Moraes Holschuh h...@hmh.eng.br Reviewed-by: Darren Hart dvh

[RFC v3 14/24] powerpc: Implement arch_nvram_ops.get_size() and remove old nvram_* exports

2015-06-27 Thread Finn Thain
Implement arch_nvram_ops for PPC32 and make use of it in the generic_nvram misc device module so that the nvram_* function exports can be removed. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/powerpc/include/asm/nvram.h |3 --- arch/powerpc/kernel/setup_32.c | 10

[RFC v3 11/24] char/nvram: Add devname:nvram module alias

2015-06-27 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/nvram.c |1 + 1 file changed, 1 insertion(+) Index: linux/drivers/char/nvram.c === --- linux.orig/drivers/char/nvram.c 2015-06-28 11:41:38.0

[RFC v3 08/24] char/nvram: Implement NVRAM read/write methods

2015-06-27 Thread Finn Thain
on the latter. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/nvram.c | 162 +++ 1 file changed, 114 insertions(+), 48 deletions(-) Index: linux/drivers/char/nvram.c

[RFC v3 13/24] powerpc: Add missing ppc_md.nvram_size for CHRP and PowerMac

2015-06-27 Thread Finn Thain
and chrp_nvram_write, which break the naming convention used across PowerPC platforms for NVRAM accessor functions. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/powerpc/platforms/chrp/nvram.c | 14 ++ arch/powerpc/platforms/powermac/nvram.c |9 + 2 files changed, 19

[RFC v3 09/24] char/nvram: Use generic fixed_size_llseek()

2015-06-27 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/nvram.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) Index: linux/drivers/char/nvram.c === --- linux.orig/drivers/char/nvram.c

[RFC v3 21/24] m68k/mac: Adopt naming and calling conventions for PRAM routines

2015-06-27 Thread Finn Thain
Adopt the existing *_read_byte and *_write_byte naming convention. Rename via_pram_readbyte and via_pram_writebyte to avoid confusion. Adjust calling conventions of mac_pram_* functions to match the arch_nvram_ops struct methods. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Changes

[RFC v3 23/24] m68k/mac: Fix PRAM accessors

2015-06-27 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Tested on a PowerBook 520 and Quadra 650. Changes since v2: - Make use of the RTC_* macros from the previous patch and add a few more besides. --- arch/m68k/mac/misc.c | 39 +-- include/uapi

[RFC v3 15/24] powerpc: Implement nvram sync ioctl

2015-06-27 Thread Finn Thain
Add the powerpc-specific sync() method to struct nvram_ops and implement the corresponding ioctl in the nvram module. This allows the nvram module to replace the generic_nvram module. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- On PPC32, the IOC_NVRAM_SYNC ioctl call always returns

[RFC v3 18/24] powerpc: Remove CONFIG_GENERIC_NVRAM and adopt CONFIG_HAVE_ARCH_NVRAM_OPS

2015-06-27 Thread Finn Thain
, unimplemented ioctls return -ENOTTY. Whereas, for the superseded generic_nvram module they would return -EINVAL. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This ioctl change is visible to userspace code but only in an error path. I didn't find any userspace code that uses

[RFC v3 19/24] char/generic_nvram: Remove as unused

2015-06-27 Thread Finn Thain
And thus eliminate some twisted CONFIG_GENERIC_NVRAM logic. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/Makefile|6 - drivers/char/generic_nvram.c | 176 --- 2 files changed, 1 insertion(+), 181 deletions(-) Index

[RFC v3 05/24] char/nvram: Adopt arch_nvram_ops

2015-06-27 Thread Finn Thain
platforms and architectures. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- The #ifdefs here restrict the procfs and checksumming code to those architectures with PC-style RTC NVRAM. There may be a better place for that code but it's an open question. See https://lkml.org/lkml/2015/2/3/22

[RFC v3 01/24] scsi/atari_scsi: Dont select CONFIG_NVRAM

2015-06-27 Thread Finn Thain
the valkyriefb driver with powerpc, and since that driver uses NVRAM, it is affected by CONFIG_ATARI_SCSI, because of the use of select NVRAM. Adopt the powerpc convention on m68k to avoid surprises. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This patch temporarily disables

[RFC v3 04/24] char/nvram: Re-order functions to remove forward declarations and #ifdefs

2015-06-27 Thread Finn Thain
Also give functions more sensible names: nvram_misc_* for misc device ops, nvram_proc_* for proc file ops and nvram_module_* for init and exit functions. This makes them distict from nvram_ops members. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/char/nvram.c | 194

[RFC v3 00/24] Re-use nvram module

2015-06-27 Thread Finn Thain
The generic NVRAM module, drivers/char/generic_nvram, implements a /dev/nvram misc device. It is used only by 32-bit PowerPC platforms and isn't generic enough to be more widely used. The RTC NVRAM module, drivers/char/nvram, also implements a /dev/nvram misc device. It is used by x86, ARM and

[RFC v3 22/24] m68k/mac: Use macros for RTC accesses not magic numbers

2015-06-27 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This is intended to improve code style and not affect code behaviour. I've tested this on a Quadra 650. I don't know the meanings of the 4 undocumented write protect register bits 0x55, so I decided against defining 4 macros for those

  1   2   3   4   5   >