From: "Mark A. Greer" <mgreer@mvista.com>
To: linuxppc-dev <linuxppc-dev@lists.linuxppc.org>
Subject: Re: linuxppc_2_4_devel patch for Force CPCI-690
Date: Thu, 01 May 2003 15:53:04 -0700 [thread overview]
Message-ID: <3EB1A550.5080007@mvista.com> (raw)
In-Reply-To: <3EAF1A0C.3050401@mvista.com>
[-- Attachment #1: Type: text/plain, Size: 220 bytes --]
Mark A. Greer wrote:
> The following patch adds support for the Force CPCI-690 cPCI board.
>
> If no one objects, please push this into linuxppc_2_4_devel.
>
> Thanks,
>
> Mark
Grr, forgot a file in the patch...
Mark
[-- Attachment #2: cpci690.patch --]
[-- Type: text/plain, Size: 2189 bytes --]
===== arch/ppc/boot/simple/misc-cpci690.c 1.1 vs edited =====
--- 1.1/arch/ppc/boot/simple/misc-cpci690.c Thu May 1 15:44:08 2003
+++ edited/arch/ppc/boot/simple/misc-cpci690.c Thu May 1 15:44:21 2003
@@ -0,0 +1,72 @@
+/*
+ * arch/ppc/boot/simple/misc-cpci690.c
+ *
+ * Add birec data for Force CPCI690 board.
+ *
+ * Author: Mark A. Greer <source@mvista.com>
+ *
+ * Copyright 2003 MontaVista Software Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/types.h>
+#include <asm/bootinfo.h>
+
+#include "nonstdio.h"
+
+#include "../../platforms/cpci690.h"
+
+#define ENET_MAC_LEN 6
+#define GT64260_SETUP "gt_mac"
+
+extern struct bi_record *decompress_kernel(unsigned long load_addr,
+ int num_words,
+ unsigned long cksum);
+
+static bd_t board_info;
+
+/*
+ * The MAC addresses are store in the RTC's NVRAM. We need to get them out
+ * from there, convert to the proper format for the kernel driver,
+ * and pass them into the kernel.
+ */
+struct bi_record *
+load_kernel(u32 load_addr, int num_words, u32 chksum)
+{
+ struct bi_record *bi_recs;
+ struct bi_record *rec;
+ bd_t *bip = &board_info;
+
+ bi_recs = decompress_kernel(load_addr, num_words, chksum);
+
+ /*
+ * Get the MAC addrs from RTC's NVRAM and pass in to kernel via
+ * a bd_t type of bi_rec.
+ */
+ rec = bi_recs;
+ if (rec && rec->tag == BI_FIRST) {
+ bip->bi_magic = CPCI690_BI_MAGIC;
+
+ memcpy(bip->bi_enetaddr[0],
+ (void *)(CPCI690_TODC_BASE+CPCI690_MAC_OFFSET),
+ sizeof(bip->bi_enetaddr));
+
+ while (rec->tag != BI_LAST)
+ rec = (struct bi_record *)((ulong)rec + rec->size);
+
+ rec->tag = BI_BOARD_INFO;
+ memcpy((char *)rec->data, bip, sizeof(bd_t));
+ rec->size = sizeof(struct bi_record) + sizeof(bd_t);
+ rec = (struct bi_record *)((unsigned long)rec + rec->size);
+
+ rec->tag = BI_LAST;
+ rec->size = sizeof(struct bi_record);
+ rec = (struct bi_record *)((ulong)rec + rec->size);
+ }
+
+ return bi_recs;
+}
prev parent reply other threads:[~2003-05-01 22:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-30 0:34 linuxppc_2_4_devel patch for Force CPCI-690 Mark A. Greer
2003-05-01 22:53 ` Mark A. Greer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3EB1A550.5080007@mvista.com \
--to=mgreer@mvista.com \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).