By implementing an arch_nvram_ops struct, any platform can re-use the
drivers/char/nvram module without needing any arch-specific code
in that module. Atari does so here.
Atari has one user of nvram_check_checksum() whereas the other platforms
(i.e. x86 and ARM platforms) have none at all.
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
Currently the AC'97 mode in fsl_ssi driver isn't functional.
This patch implements the following changes to make it work
properly:
* IPG clock have to be enabled during AC'97 CODEC
register access,
* AC'97 DAI driver struct need the same probe method as
I2S one to setup DMA params,
* AC'97 bus
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 +--
Hello Fabio,
W dniu 28.06.2015 01:06, Fabio Estevam pisze:
Hi Maciej,
On Sat, Jun 27, 2015 at 7:51 PM, Maciej S. Szmigiero
m...@maciej.szmigiero.name wrote:
Currently the AC'97 mode in fsl_ssi driver isn't functional.
Thanks for the fix. I look forward to test it on my udoo board.
This makes various USB and Endpoint manipulation functions have a
return type of void now due to these particular functions always
running to completion successfully nor their callers putting the
return value when calling one of these functions into a variable
to check/use later in their own
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 |
The drivers/char/nvram module has previously only supported RTC CMOS
NVRAM, for which it provides appropriate checksum ioctls. Make these
ioctls optional so the module can be re-used with other kinds of NVRAM.
The ops struct methods that implement the ioctls now return error
codes so that a
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
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
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
Refactor the RTC CMOS NVRAM functions so that they can be used as
arch_nvram_ops methods. Checksumming logic is moved from the misc device
operations to the nvram read/write operations.
This makes the misc device implementation more generic. This also
preserves the locking semantics such that
Add the nvram_size() function to those PowerPC platforms that don't already
have one: CHRP and PowerMac. This means that the ppc_md.nvram_size()
function can be used to implement arch_nvram_ops.get_size()
Since we are addressing inconsistencies here, also rename chrp_nvram_read
and
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
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
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 +--
This makes the function txcomplete have a return type of void
now due to this particular function always running successfully
nor its callers checking/using the return value from this particular
function in their own internal work.
Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
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
Switch PPC32 kernels from the generic_nvram module to the nvram module.
Also fix a theoretical bug where CHRP omits the chrp_nvram_init()
call when CONFIG_NVRAM_MODULE=m.
As before, when CONFIG_PPC !CONFIG_PPC_PMAC, the IOC_NVRAM_GET_OFFSET
ioctl is unimplemented. For the nvram module,
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:
Different platforms and architectures offer different NVRAM sizes and
access methods. E.g. PPC32 has byte-at-a-time read/write functions whereas
PPC64 has byte-range read/write functions. Adopt the nvram_ops struct so
the nvram module can call such functions as are defined by the various
On powerpc, setting CONFIG_NVRAM=n builds a kernel with no NVRAM support.
Setting CONFIG_NVRAM=m enables the /dev/nvram misc device module without
enabling NVRAM support in drivers. Setting CONFIG_NVRAM=y enables the
misc device (built-in) and also enables NVRAM support in drivers.
m68k shares
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
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
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
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
Adopt nvram module to reduce code duplication.
The IOC_NVRAM_GET_OFFSET ioctl as implemented on PPC64 validates the offset
returned by pmac_get_partition(). Add this test to the nvram module.
Note that the old PPC32 generic_nvram module lacked this test.
So when CONFIG_PPC32 CONFIG_PPC_PMAC,
Hi Maciej,
On Sat, Jun 27, 2015 at 7:51 PM, Maciej S. Szmigiero
m...@maciej.szmigiero.name wrote:
Currently the AC'97 mode in fsl_ssi driver isn't functional.
Thanks for the fix. I look forward to test it on my udoo board.
This patch implements the following changes to make it work
properly:
On Sat, Jun 27, 2015 at 7:51 PM, Maciej S. Szmigiero
m...@maciej.szmigiero.name wrote:
+
+ ret = clk_prepare_enable(fsl_ac97_data-clk);
+ if (ret) {
+ pr_err(ac97 read clk_prepare_enable failed: %d\n,
+ ret);
+ return -1;
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
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
---
Maciej S. Szmigiero wrote:
+ if (newbinding fsl_ssi_is_ac97(ssi_private)) {
Is the newbinding necessary? I thought only the original PowerPC
device trees were the only one that have the old binding, and they never
supported AC97.
___
32 matches
Mail list logo