2 * (C) Copyright 2007 Michal Simek
4 * Michal SIMEK <monstr@monstr.eu>
6 * See file CREDITS for list of people who contributed to this
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 * Microblaze FSL support
34 #if (CONFIG_COMMANDS & CFG_CMD_MFSL)
36 int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
40 unsigned int blocking;
43 printf ("Usage:\n%s\n", cmdtp->usage);
47 fslnum = (unsigned int)simple_strtoul (argv[1], NULL, 16);
48 blocking = (unsigned int)simple_strtoul (argv[2], NULL, 16);
49 if (fslnum < 0 || fslnum >= XILINX_FSL_NUMBER) {
50 puts ("Bad number of FSL\n");
51 printf ("Usage:\n%s\n", cmdtp->usage);
56 #if (XILINX_FSL_NUMBER > 0)
65 #if (XILINX_FSL_NUMBER > 1)
74 #if (XILINX_FSL_NUMBER > 2)
83 #if (XILINX_FSL_NUMBER > 3)
92 #if (XILINX_FSL_NUMBER > 4)
101 #if (XILINX_FSL_NUMBER > 5)
110 #if (XILINX_FSL_NUMBER > 6)
119 #if (XILINX_FSL_NUMBER > 7)
132 printf ("%01x: 0x%08lx - %s read\n", fslnum, num,
133 blocking ? "blocking" : "non blocking");
137 int do_fwr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
141 unsigned int blocking;
144 printf ("Usage:\n%s\n", cmdtp->usage);
148 fslnum = (unsigned int)simple_strtoul (argv[1], NULL, 16);
149 num = (unsigned int)simple_strtoul (argv[2], NULL, 16);
150 blocking = (unsigned int)simple_strtoul (argv[3], NULL, 16);
151 if (fslnum < 0 || fslnum >= XILINX_FSL_NUMBER) {
152 printf ("Bad number of FSL\nUsage:\n%s\n", cmdtp->usage);
157 #if (XILINX_FSL_NUMBER > 0)
166 #if (XILINX_FSL_NUMBER > 1)
175 #if (XILINX_FSL_NUMBER > 2)
184 #if (XILINX_FSL_NUMBER > 3)
193 #if (XILINX_FSL_NUMBER > 4)
202 #if (XILINX_FSL_NUMBER > 5)
211 #if (XILINX_FSL_NUMBER > 6)
220 #if (XILINX_FSL_NUMBER > 7)
233 printf ("%01x: 0x%08lx - %s write\n", fslnum, num,
234 blocking ? "blocking" : "non blocking");
239 int do_rmsr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
244 printf ("Usage:\n%s\n", cmdtp->usage);
248 printf ("rmsr: 0x%08lx\n", val);
252 /***************************************************/
254 U_BOOT_CMD (frd, 3, 1, do_frd,
255 "frd - read data from FSL\n",
256 "- [fslnum [0|x]], (0 - non blocking|x - blocking).\n");
258 U_BOOT_CMD (fwr, 4, 1, do_fwr,
259 "fwr - write data to FSL\n",
260 "- [fslnum data [0|x]], (0 - non blocking|x - blocking).\n");
262 U_BOOT_CMD (rmsr, 1, 1, do_rmsr,
263 "rmsr - read MSR register\n", "- read MSR register.\n");
265 #endif /* CONFIG_MICROBLAZE & CFG_CMD_MFSL */