Signed-off-by: Finn Thain
---
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 +1000
+++ linux/drivers/char
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
---
arch/powerpc/include/asm/nvram.h
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
---
drivers/char/nvram.c | 194
. 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
---
The advantage of the new ops struct over the old global nvram_* functions
is that the misc device module can be shared by different
on Macs.
Signed-off-by: Finn Thain
---
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/m68k/Kconfig|2
Signed-off-by: Finn Thain
---
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
d
and chrp_nvram_write, which break the naming convention used across
PowerPC platforms for NVRAM accessor functions.
Signed-off-by: Finn Thain
---
arch/powerpc/platforms/chrp/nvram.c | 14 ++
arch/powerpc/platforms/powermac/nvram.c |9 +
2 files changed, 19 insertions(+), 4 dele
Signed-off-by: Finn Thain
---
drivers/macintosh/nvram.c | 130 --
1 file changed, 130 deletions(-)
Index: linux/drivers/macintosh/nvram.c
===
--- linux.orig/drivers/macintosh/nvram.c
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
---
arch/powerpc/include/asm/nvram.h |3 ---
arch/powerpc/kernel/setup_32.c | 10 +++---
drivers/char
platforms and architectures.
Signed-off-by: Finn Thain
---
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
The procfs code her
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
---
arch/m68k/Kconfig |2
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
---
arch/m68k/atari/nvram.c |6 +++---
drivers/char/nvram.c| 27 +--
include/linux/nvram.h |8
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
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
---
drivers/platform/x86/thinkpad_acpi.c | 20 ++--
1 file changed, 10 insertions(+), 10
so that a multi-platform kernel binary can do the right thing when
running on hardware without suitable NVRAM.
Signed-off-by: Finn Thain
---
drivers/char/nvram.c | 61 --
include/linux/nvram.h |2 +
2 files changed, 37 insertions(+), 26
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
---
This re-enables the nvram module for Atari.
---
arch/m68k/Kconfig |3 +++
arch/m68k/atari
Signed-off-by: Finn Thain
---
drivers/char/nvram.c | 16 +---
1 file changed, 1 insertion(+), 15 deletions(-)
Index: linux/drivers/char/nvram.c
===
--- linux.orig/drivers/char/nvram.c 2015-05-31 11:01
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 m6
And thus eliminate some twisted CONFIG_GENERIC_NVRAM logic.
Signed-off-by: Finn Thain
---
drivers/char/Makefile|6 -
drivers/char/generic_nvram.c | 176 ---
2 files changed, 1 insertion(+), 181 deletions(-)
Index: linux/drivers/char
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
---
On PPC32, the IOC_NVRAM_SYNC ioctl call always returns 0, even for those
d PPC64 when
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
---
BTW, the IOC_NVRAM_SYNC ioctl call returns -EINVAL on P
m module, unimplemented ioctls return
-ENOTTY. Whereas, for the superseded generic_nvram module they would
return -EINVAL.
Signed-off-by: Finn Thain
---
This ioctl change is visible to userspace code but only in an error path.
I didn't find any userspace code that uses the IOC_NVRAM_GET_OFFSE
e former but
will fall back on the latter.
Signed-off-by: Finn Thain
---
drivers/char/nvram.c | 162 +++
1 file changed, 114 insertions(+), 48 deletions(-)
Index: linux/drivers/char/nvram.c
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
---
This patch temporarily disables CONFIG_NVRAM on Atari,
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
---
BTW, I didn't change the SCSI ID location in NVRAM. This code says 16
whereas atari_scsi says 14. Whic
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
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
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, plea
Signed-off-by: Finn Thain
Acked-by: Geert Uytterhoeven
---
drivers/macintosh/nvram.c | 130 --
1 file changed, 130 deletions(-)
Index: linux/drivers/macintosh/nvram.c
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
---
This patch temporarily disables CONFIG_NVRAM on Atari,
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 m6
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
---
BTW, I didn't change the SCSI ID location in NVRAM. This code says 16
whereas atari_scsi says 14. Whic
. 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
---
The advantage of the new ops struct over the old global nvram_* functions
is that the misc device module can be shared by different
platforms and architectures.
Signed-off-by: Finn Thain
---
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
The procfs code her
Signed-off-by: Finn Thain
---
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 +1000
+++ linux/drivers/char
so that a multi-platform kernel binary can do the right thing when
running on hardware without suitable NVRAM.
Signed-off-by: Finn Thain
---
Changed since v1:
- Don't bother acquiring the mutex for unimplemented ioctls.
---
drivers/char/
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
---
arch/powerpc/include/asm/nvram.h
Signed-off-by: Finn Thain
---
drivers/char/nvram.c | 16 +---
1 file changed, 1 insertion(+), 15 deletions(-)
Index: linux/drivers/char/nvram.c
===
--- linux.orig/drivers/char/nvram.c 2015-06-14 17:45
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
---
drivers/char/nvram.c | 194
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
---
This re-enables the nvram module for Atari.
---
arch/m68k/Kconfig |3 +++
arch/m68k/atari
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
Acked-by: Henrique de Moraes Holschuh
Reviewed-by: Darren Hart
---
drivers/platform/x86/thinkpad_acpi.c
e former but
will fall back on the latter.
Signed-off-by: Finn Thain
---
drivers/char/nvram.c | 162 +++
1 file changed, 114 insertions(+), 48 deletions(-)
Index: linux/drivers/char/nvram.c
d
and chrp_nvram_write, which break the naming convention used across
PowerPC platforms for NVRAM accessor functions.
Signed-off-by: Finn Thain
---
arch/powerpc/platforms/chrp/nvram.c | 14 ++
arch/powerpc/platforms/powermac/nvram.c |9 +
2 files changed, 19 insertions(+), 4 dele
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
---
arch/powerpc/include/asm/nvram.h |3 ---
arch/powerpc/kernel/setup_32.c | 10 +++---
drivers/char
m module, unimplemented ioctls return
-ENOTTY. Whereas, for the superseded generic_nvram module they would
return -EINVAL.
Signed-off-by: Finn Thain
---
This ioctl change is visible to userspace code but only in an error path.
I didn't find any userspace code that uses the IOC_NVRAM_GET_OFFSE
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
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
---
Changes since v1:
- Don
d PPC64 when
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
---
BTW, the IOC_NVRAM_SYNC ioctl call returns -EINVAL on P
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
---
On PPC32, the IOC_NVRAM_SYNC ioctl call always returns 0, even for those
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
---
arch/m68k/atari/nvram.c |6 +++---
drivers/char/nvram.c| 27 +--
include/linux/nvram.h |8
And thus eliminate some twisted CONFIG_GENERIC_NVRAM logic.
Signed-off-by: Finn Thain
---
drivers/char/Makefile|6 -
drivers/char/generic_nvram.c | 176 ---
2 files changed, 1 insertion(+), 181 deletions(-)
Index: linux/drivers/char
Signed-off-by: Finn Thain
---
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
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
On Mon, 15 Jun 2015, Geert Uytterhoeven wrote:
> Hi Finn,
>
> On Sun, Jun 14, 2015 at 9:46 AM, Finn Thain
> 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 +100
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 doc
. 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
---
The advantage of the new ops struct over the old global nvram_* functions
is that the misc device module can be shared by different
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
---
drivers/char/nvram.c | 194
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 m6
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
---
This patch temporarily disables CONFIG_NVRAM on Atari,
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
---
BTW, I didn't change the SCSI ID location in NVRAM. This code says 16
whereas atari_scsi says 14. Whic
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
---
arch/powerpc/include/asm/nvram.h
so that a multi-platform kernel binary can do the right thing when
running on hardware without suitable NVRAM.
Signed-off-by: Finn Thain
---
Changed since v1:
- Don't bother acquiring the mutex for unimplemented ioctls.
---
drivers/char/
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
---
This re-enables the nvram module for Atari.
---
arch/m68k/Kconfig |3 +++
arch/m68k/atari
Signed-off-by: Finn Thain
---
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 +1000
+++ linux/drivers/char
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
---
arch/powerpc/include/asm/nvram.h |3 ---
arch/powerpc/kernel/setup_32.c | 10 +++---
drivers/char
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
Acked-by: Henrique de Moraes Holschuh
Reviewed-by: Darren Hart
---
drivers/platform/x86/thinkpad_acpi.c
e former but
will fall back on the latter.
Signed-off-by: Finn Thain
---
drivers/char/nvram.c | 162 +++
1 file changed, 114 insertions(+), 48 deletions(-)
Index: linux/drivers/char/nvram.c
Signed-off-by: Finn Thain
---
drivers/char/nvram.c | 16 +---
1 file changed, 1 insertion(+), 15 deletions(-)
Index: linux/drivers/char/nvram.c
===
--- linux.orig/drivers/char/nvram.c 2015-06-28 11:41
d
and chrp_nvram_write, which break the naming convention used across
PowerPC platforms for NVRAM accessor functions.
Signed-off-by: Finn Thain
---
arch/powerpc/platforms/chrp/nvram.c | 14 ++
arch/powerpc/platforms/powermac/nvram.c |9 +
2 files changed, 19 insertions(+), 4 dele
platforms and architectures.
Signed-off-by: Finn Thain
---
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
The procfs code her
m module, unimplemented ioctls return
-ENOTTY. Whereas, for the superseded generic_nvram module they would
return -EINVAL.
Signed-off-by: Finn Thain
---
This ioctl change is visible to userspace code but only in an error path.
I didn't find any userspace code that uses the IOC_NVRAM_GET_OFFSE
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
---
On PPC32, the IOC_NVRAM_SYNC ioctl call always returns 0, even for those
And thus eliminate some twisted CONFIG_GENERIC_NVRAM logic.
Signed-off-by: Finn Thain
---
drivers/char/Makefile|6 -
drivers/char/generic_nvram.c | 176 ---
2 files changed, 1 insertion(+), 181 deletions(-)
Index: linux/drivers/char
d PPC64 when
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
---
BTW, the IOC_NVRAM_SYNC ioctl call returns -EINVAL on P
Signed-off-by: Finn Thain
---
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 bits.
---
arc
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
Signed-off-by: Finn Thain
---
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/linux/pmu.h |2 ++
2
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
---
Changes since v1:
- Don
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
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
---
arch/m68k/atari/nvram.c |6 +++---
drivers/char/nvram.c| 27 +--
include/linux/nvram.h |8
On Mon, 29 Jun 2015, Geert Uytterhoeven wrote:
> Hi Finn,
>
> On Sun, Jun 28, 2015 at 3:42 AM, Finn Thain
> wrote:
> > Change the vmode calculation from logical OR to bitwise OR, since it
> > is obviously wrong.
>
> Ideally, that should be a separate patch we
On Mon, 29 Jun 2015, Geert Uytterhoeven wrote:
> On Sun, Jun 28, 2015 at 3:42 AM, Finn Thain
> wrote:
> > --- linux.orig/arch/m68k/kernel/setup_mm.c 2015-06-28
> > 11:41:27.0 +1000
> > +++ linux/arch/m68k/kernel/setup_mm.c 2015-06-28 11:41:56.
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 m6
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
---
This patch temporarily disables CONFIG_NVRAM on Atari,
. 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
---
The advantage of the new ops struct over the old global nvram_* functions
is that the misc device module can be shared by different
Signed-off-by: Finn Thain
Acked-by: Geert Uytterhoeven
---
drivers/char/nvram.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux/drivers/char/nvram.c
===
--- linux.orig/drivers/char/nvram.c 2015-07-12 20
Move the m68k-specific code elsewhere to make the driver generic.
Signed-off-by: Finn Thain
---
BTW, I didn't change the SCSI ID location in NVRAM. This code says 16
whereas atari_scsi says 14. Which one is correct?
Changes since v3:
- Move the vmode fix to a separate patch as request
platforms and architectures.
Signed-off-by: Finn Thain
---
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
The procfs code here, u
Signed-off-by: Finn Thain
---
drivers/char/nvram.c | 16 +---
1 file changed, 1 insertion(+), 15 deletions(-)
Index: linux/drivers/char/nvram.c
===
--- linux.orig/drivers/char/nvram.c 2015-07-12 20:25
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
---
This re-enables the nvram module for Atari.
Changes since v3:
- Use bool (and select) instead of
Signed-off-by: Finn Thain
---
drivers/char/nvram.c |1 +
1 file changed, 1 insertion(+)
Index: linux/drivers/char/nvram.c
===
--- linux.orig/drivers/char/nvram.c 2015-07-12 20:25:05.0 +1000
+++ linux/drivers/char
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
Acked-by: Henrique de Moraes Holschuh
Reviewed-by: Darren Hart
---
drivers/platform/x86/thinkpad_acpi.c
so that a multi-platform kernel binary can do the right thing when
running on hardware without suitable NVRAM.
Signed-off-by: Finn Thain
---
Changed since v1:
- Don't bother acquiring the mutex for unimplemented ioctls.
---
drivers/char/
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
---
arch/powerpc/include/asm/nvram.h
d
and chrp_nvram_write, which break the naming convention used across
PowerPC platforms for NVRAM accessor functions.
Signed-off-by: Finn Thain
---
arch/powerpc/platforms/chrp/nvram.c | 14 ++
arch/powerpc/platforms/powermac/nvram.c |9 +
2 files changed, 19 insertions(+), 4 dele
e former but
will fall back on the latter.
Signed-off-by: Finn Thain
---
drivers/char/nvram.c | 162 +++
1 file changed, 114 insertions(+), 48 deletions(-)
Index: linux/drivers/char/nvram.c
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
---
drivers/char/nvram.c | 194
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
---
arch/powerpc/include/asm/nvram.h |3 ---
arch/powerpc/kernel/setup_32.c | 10 +++---
drivers/char
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
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
---
arch/m68k/atari/nvram.c |6 +++---
drivers/char/nvram.c| 27 +--
include/linux/nvram.h |8
1 - 100 of 523 matches
Mail list logo