[PATCH] COBALT: Remove all traces of COBALT from nvram.c

[PATCH] COBALT: Remove all traces of COBALT from nvram.c

Post by Robert P. » Tue, 05 Jun 2007 07:00:17


Drop all references to the COBALT arch from drivers/char/nvram.c.

Signed-off-by: Robert P. J. Day < XXXX@XXXXX.COM >

---

diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index 204deaa..98dec38 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -42,19 +42,12 @@

#define PC 1
#define ATARI 2
-#define COBALT 3

/* select machine configuration */
#if defined(CONFIG_ATARI)
# define MACH ATARI
#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) /* and others?? */
-#define MACH PC
-# if defined(CONFIG_COBALT)
-# include <linux/cobalt-nvram.h>
-# define MACH COBALT
-# else
-# define MACH PC
-# endif
+# define MACH PC
#else
# error Cannot build nvram driver for this machine configuration.
#endif
@@ -76,18 +69,6 @@

#endif

-#if MACH == COBALT
-
-#define CHECK_DRIVER_INIT() 1
-
-#define NVRAM_BYTES (128-NVRAM_FIRST_BYTE)
-
-#define mach_check_checksum cobalt_check_checksum
-#define mach_set_checksum cobalt_set_checksum
-#define mach_proc_infos cobalt_proc_infos
-
-#endif
-
#if MACH == ATARI

/* Special parameters for RTC in Atari machines */
@@ -604,177 +585,6 @@ pc_proc_infos(unsigned char *nvram, char *buffer, int *len,

#endif /* MACH == PC */

-#if MACH == COBALT
-
-/* the cobalt CMOS has a wider range of its checksum */
-static int cobalt_check_checksum(void)
-{
- int i;
- unsigned short sum = 0;
- unsigned short expect;
-
- for (i = COBT_CMOS_CKS_START; i <= COBT_CMOS_CKS_END; ++i) {
- if ((i == COBT_CMOS_CHECKSUM) || (i == (COBT_CMOS_CHECKSUM+1)))
- continue;
-
- sum += __nvram_read_byte(i);
- }
- expect = __nvram_read_byte(COBT_CMOS_CHECKSUM) << 8 |
- __nvram_read_byte(COBT_CMOS_CHECKSUM+1);
- return ((sum & 0xffff) == expect);
-}
-
-static void cobalt_set_checksum(void)
-{
- int i;
- unsigned short sum = 0;
-
- for (i = COBT_CMOS_CKS_START; i <= COBT_CMOS_CKS_END; ++i) {
- if ((i == COBT_CMOS_CHECKSUM) || (i == (COBT_CMOS_CHECKSUM+1)))
- continue;
-
- sum += __nvram_read_byte(i);
- }
-
- __nvram_write_byte(sum >> 8, COBT_CMOS_CHECKSUM);
- __nvram_write_byte(sum & 0xff, COBT_CMOS_CHECKSUM+1);
-}
-
-#ifdef CONFIG_PROC_FS
-
-static int cobalt_proc_infos(unsigned char *nvram, char *buffer, int *len,
- off_t *begin, off_t offset, int size)
-{
- int i;
- unsigned int checksum;
- unsigned int flags;
- char sernum[14];
- char *key = "cNoEbTaWlOtR!";
- unsigned char bto_csum;
-
- spin_lock_irq(&rtc_lock);
- checksum = __nvram_check_checksum();
- spin_unlock_irq(&rtc_lock);
-
- PRINT_PROC("Checksum status: %svalid\n", checksum ? "" : "not ");
-
- flags = nvram[COBT_CMOS_FLAG_BYTE_0] << 8
- | nvram[COBT_CMOS_FLAG_BYTE_1];
-
- PRINT_PROC("Console: %s\n",
- flags & COBT_CMOS_CONSOLE_FLAG ? "on": "off");
-
- PRINT_PROC("Firmware Debug Messages: %s\n",
- flags & COBT_CMOS_DEBUG_FLAG ? "on": "off");
-
- PRINT_PROC("Auto Prompt: %s\n",
- flags & COBT_CMOS_AUTO_PROMPT_FLAG ? "on": "off");
-
- PRINT_PROC("Shutdown Status: %s\n",
- flags & COBT_CMOS_CLEAN_BOOT_FLAG ? "clean": "dirty");
-
- PRINT_PROC("Hardware Probe: %s\n",
- flags & COBT_CMOS_HW_NOPROBE_FLAG ? "partial": "full");
-
- PRINT_PROC("System Fault: %sdetected\n",
- flags & COBT_CMOS_SYSFAULT_FLAG ? "": "not ");
-
- PRINT_PROC("Panic on OOPS: %s\n",
- flags & COBT_CMOS_OOPSPANIC_FLAG ? "yes": "no");
-
- PRINT_PROC("Delayed Cache In
 
 
 

1. Factory Reconditioned KitchenAid RRKHM5APBU 7-Speed Artisan Hand Mixers, Cobalt Blue

2. Cobalt XTR & FrontPage HELP...

I need help with my XTR. I know everyone hates the problems that
frontpage creates on servers, however, I need it to work for my
clients hosted on my XTR.
I loaded the latest 9 packages and now FrontPage does not work... well
it prompts you for a user name and password, however, doesn't accept
any thing.
I tried deleting a website and all of its content, then re-adding it
with FrontPage extensions - still didn't work.
Anyone have any idea how to fix this?

Thank you,
Rob

3. ASP, ODBC & Cobalt Qube Server....

4. Palm OS Cobalt 6.1 ; Web Browser 3.0 ; Email API ; Dev Suite 1.0

5. cgiemail and cgiwrap on cobalt RaQ

6. problems with Cobalt Raq4 email aliases

7. cobalt raq4: disable pop before smtp

8. ALFI Achat Carafe with Cobalt Blue Handle 8-c.

9. Garnet and Cobalt

10. Palm Cobalt Simulator Encounters Unhandled Exception

11. Cobalt - market dates?

12. SN#10864 Sun Cobalt RaQ[TM] 550 Server Appliance and Netra[TM] Server Announcements

13. CW9.3 won't connect to Cobalt simulator

14. KitchenAid KP2671XBU Professional 6-Quart Stand Mixer, Cobalt Blue

15. Cobalt email server delivering to wrong user address