public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* NCR 7452/3 POS - Retail CMOS NVRAM Driver
@ 2003-01-16  0:11 Gabriel Gomiz
  2003-01-16 13:06 ` Richard B. Johnson
  0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Gomiz @ 2003-01-16  0:11 UTC (permalink / raw)
  To: linux-kernel

I say Hi to the greatests hackers!

I'm trying to build a kernel module driver to be able to access the CMOS 
NVRAM that the NCR 7452/3 POS (Point of Sale) has built-in on the 
motherboard. All the information that I could get from the manufacturers 
is that the memory works at I/O address 0x100. But later I found out 
that you can configure the I/O address using switches on the motherboard 
to one of the following ranges of addresses:
0x100-0x10F DEFAULT
0x120-0x12F
0x140-0x14F
0x160-0x16F

The memory chips that NCR uses are:
1) NEC D43256BGU - NCR POS Model 7452-1011
    The chip is 256KB, but NCR says they use only 128KB
2) NEC D431000AGW - NCR POS Model 7453-1011
    The chip is 1MB, but NCR says they use only 128KB

I've made a simple kernel module (based on drivers/char/nvram.c) to see 
if I can _test_ the memory (to see if it is there and read/write some 
bytes from 0x100 I/O Port) and I'm getting some confusing results.
In the end the module does the following:

#ifndef NVRAM_PORT
#define NVRAM_PORT(x)	(0x100 + (x))
#endif

#define NVRAM_READ(addr) ({ \
outb_p((addr),NVRAM_PORT(0)); \
inb_p(NVRAM_PORT(1)); \
})

#define NVRAM_WRITE(val, addr) ({ \
outb_p((addr),NVRAM_PORT(0)); \
outb_p((val),NVRAM_PORT(1)); \
})

The questions are:

* Has anyone worked with this kind of NVRAM before?
* Do you know how can the memory be programmed? Maybe you can enlight me 
with something... :)

I have some more details of the module and the tests I've been doing to 
send if someone is interested.

OBS: If this message is considered highly off-topic, please can you 
point me in the right direction to ask this questions? (Maybe linux-mtd???)

Many thanks in advance

-- 
    .^.    Gabriel Gomiz - Red Hat Certified Engineer (RHCE)
    /V\
   // \\
  /(   )\
   ^^-^^   s/Window[$s]/LINUX!!/g or die;


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: NCR 7452/3 POS - Retail CMOS NVRAM Driver
  2003-01-16  0:11 NCR 7452/3 POS - Retail CMOS NVRAM Driver Gabriel Gomiz
@ 2003-01-16 13:06 ` Richard B. Johnson
  2003-01-16 20:00   ` Gabriel Gomiz
  0 siblings, 1 reply; 3+ messages in thread
From: Richard B. Johnson @ 2003-01-16 13:06 UTC (permalink / raw)
  To: Gabriel Gomiz; +Cc: linux-kernel

On Wed, 15 Jan 2003, Gabriel Gomiz wrote:

> I say Hi to the greatests hackers!
> 
> 
> The memory chips that NCR uses are:
> 1) NEC D43256BGU - NCR POS Model 7452-1011
>     The chip is 256KB, but NCR says they use only 128KB
> 2) NEC D431000AGW - NCR POS Model 7453-1011
>     The chip is 1MB, but NCR says they use only 128KB
> 
Look in the ethernet drivers for the "bit-banging" routines
used to access NVRAM in the devices. You need to shift bits
in and out of these devices. They are SERIAL ERPROMS. You
can get data sheets by using your favorite search engine
(as I just did).



Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: NCR 7452/3 POS - Retail CMOS NVRAM Driver
  2003-01-16 13:06 ` Richard B. Johnson
@ 2003-01-16 20:00   ` Gabriel Gomiz
  0 siblings, 0 replies; 3+ messages in thread
From: Gabriel Gomiz @ 2003-01-16 20:00 UTC (permalink / raw)
  To: root; +Cc: linux-kernel

Richard B. Johnson wrote:
> On Wed, 15 Jan 2003, Gabriel Gomiz wrote:
>>
>>The memory chips that NCR uses are:
>>1) NEC D43256BGU - NCR POS Model 7452-1011
>>    The chip is 256KB, but NCR says they use only 128KB
>>2) NEC D431000AGW - NCR POS Model 7453-1011
>>    The chip is 1MB, but NCR says they use only 128KB
>>
> 
> Look in the ethernet drivers for the "bit-banging" routines
> used to access NVRAM in the devices. You need to shift bits
> in and out of these devices. They are SERIAL ERPROMS. You
> can get data sheets by using your favorite search engine
> (as I just did).

I grabbed the datasheets of the memory chips and found out the 
following, that changes the incorrect information that I had:

1) NEC D43256BGU is 256Kbits = 32KB (32768 words of 8 bits)

This chip has 15 address lines (A0-A14) and 8 data lines (I/O1 - I/O8).

2) NEC D431000AGW is 1Mbit = 128KB (131072 word of 8 bits)

This chip has 17 address lines (A0-A16) and 8 data lines (I/O1 - I/O8).

So it seems that these chips doesn't have a serial-like interface for 
bit-banging, I am wrong?

-- 
    .^.    Gabriel Gomiz - Red Hat Certified Engineer (RHCE)
    /V\
   // \\
  /(   )\
   ^^-^^   s/Window[$s]/LINUX!!/g or die;


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-16 19:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-16  0:11 NCR 7452/3 POS - Retail CMOS NVRAM Driver Gabriel Gomiz
2003-01-16 13:06 ` Richard B. Johnson
2003-01-16 20:00   ` Gabriel Gomiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox