From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] sh: Renesas R0P7785LC0011RL board support
Date: Wed, 9 Jul 2008 21:28:34 +0200 [thread overview]
Message-ID: <20080709192834.GF18713@game.jcrosoft.org> (raw)
In-Reply-To: <4874AA13.9090904@renesas.com>
> +include $(TOPDIR)/config.mk
> +
> +LIB = lib$(BOARD).a
> +
> +COBJS := r0p7785lc0011rl.o selfcheck.o rtl8169_mac.o
> +SOBJS := lowlevel_init.o
> +
> +$(LIB): $(COBJS) $(SOBJS)
> + $(AR) crv $@ $(COBJS) $(SOBJS)
please use $(ARFLAGS) instead of 'crv'
> +
> +clean:
> + rm -f $(SOBJS) $(OBJS)
> +
> +distclean: clean
> + rm -f $(LIB) core *.bak .depend
pelase add the $(obj)
> +
> +#########################################################################
> +
> +.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
> + $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
> +
> +-include .depend
> +
> + * MA 02111-1307 USA
> + */
> +
> +#define PCIREG_8(_adr) (*(volatile unsigned char *)(_adr))
> +#define PCIREG_32(_adr) (*(volatile unsigned long *)(_adr))
> +#define PCI_PAR PCIREG_32(0xfe0401c0)
> +#define PCI_PDR PCIREG_32(0xfe040220)
> +#define PCI_CR PCIREG_32(0xfe040100)
> +#define PCI_CONF1 PCIREG_32(0xfe040004)
> +
> +#define EEPROM_ADD 0x00000050
> +#define HIGH 1
> +#define LOW 0
> +
> +#define PCI_PROG 0x80
> +
> +#define PCI_EEP_ADDRESS (unsigned short)0x0007
> +#define PCI_MAC_ADDRESS_SIZE 3
> +
> +#define TIME1 100
> +#define TIME2 20000
> +#define BIT_DUMMY 0
> +#define MAC_EEP_READ 1
> +#define MAC_EEP_WRITE 2
> +#define MAC_EEP_ERACE 3
> +#define MAC_EEP_EWEN 4
> +#define MAC_EEP_EWDS 5
> +
> +#define DEBUG 0
Please remove
Could you add few comment about the data?
> +
> +/* RTL8169 */
> +const unsigned short EEPROM_W_Data_8169_A[] = {
> + 0x8129, 0x10ec, 0x8169, 0x1154, 0x032b,
> + 0x4020, 0xa101
> +};
> +const unsigned short EEPROM_W_Data_8169_B[] = {
> + 0x4d15, 0xf7c2, 0x8000, 0x0000, 0x0000, 0x1300,
> + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
> + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2000,
> + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
> + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
> + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
> + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
> +};
> +
> +
> +int do_set_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> +{
> + int i;
> + unsigned char mac[6];
> + char *s, *e;
> +
> + if (argc != 2) {
> + printf("Usage:\n%s\n", cmdtp->usage);
> + return 1;
> + }
> +
> + s = argv[1];
> +
> + for (i = 0; i < 6; i++) {
> + mac[i] = s ? simple_strtoul(s, &e, 16) : 0;
> + if (s)
> + s = (*e) ? e + 1 : e;
> + }
> + mac_write(mac);
> +
> + return 0;
> +}
> +
> +U_BOOT_CMD(
> + setmac, 2, 1, do_set_mac,
> + "setmac - write MAC address for RTL8110SCL\n",
> + "\n"
> + "setmac <mac address> - write MAC address for RTL8110SCL\n"
> +);
> +
> +int do_print_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> +{
> + int i;
> + uchar mac[6];
> +
> + if (argc != 1) {
> + printf("Usage:\n%s\n", cmdtp->usage);
> + return 1;
> + }
> +
> + mac_read();
> +
> + return 0;
> +}
> +
> +U_BOOT_CMD(
> + printmac, 1, 1, do_print_mac,
> + "printmac - print MAC address for RTL8110\n",
> + "\n"
> + " - print MAC address for RTL8110\n"
> +);
Could you add a README for this board and describe its specific command?
> +
> +
> +U_BOOT_CMD(
> + hwtest, 2, 1, do_hw_test,
> + "hwtest - hardware test for R0P7785LC0011RL board\n",
> + "\n"
> + "hwtest all - test all hardware\n"
> + "hwtest pld - output pld version\n"
> + "hwtest led - test LED\n"
> + "hwtest dipsw - test DIPSW\n"
> + "hwtest sm107 - output SM107 version\n"
> + "hwtest usb - test R8A66597\n"
> + "hwtest i2c - output PCA9564 version\n"
> + "hwtest net - compare RTL8110 ID\n"
> + "hwtest sata - compare SiI3512 ID\n"
> + "hwtest pci - output PCI slot device ID\n"
> +);
idem
> +
+
> +#define CONFIG_NETMASK 255.255.255.0
> +#define CONFIG_IPADDR 192.168.10.100
> +#define CONFIG_SERVERIP 192.168.10.77
> +#define CONFIG_GATEWAYIP 192.168.10.77
please remove this 4 defines
> +
> +#define __io
> +#define __mem_pci
is it really the good place to define it??
> +
> +#define CONFIG_PCI_MEM_BUS 0xFD000000 /* Memory space base addr */
> +#define CONFIG_PCI_MEM_PHYS CONFIG_PCI_MEM_BUS
> +#define CONFIG_PCI_MEM_SIZE 0x01000000 /* Size of Memory window */
> +
Best Regards,
J.
next prev parent reply other threads:[~2008-07-09 19:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-09 12:07 [U-Boot-Users] [PATCH] sh: Renesas R0P7785LC0011RL board support Yoshihiro Shimoda
2008-07-09 19:28 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2008-07-10 10:43 ` Yoshihiro Shimoda
2008-07-09 22:28 ` Kim Phillips
2008-07-10 10:43 ` Yoshihiro Shimoda
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=20080709192834.GF18713@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=u-boot@lists.denx.de \
/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