From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Thu, 07 Feb 2008 09:28:56 -0600 Subject: [U-Boot-Users] [PATCH v4] QE IO: Add initial data to pin configuration + read/write functions In-Reply-To: References: <478F92C9.8030205@freescale.com> <47963C38.4010205@freescale.com> <479DFC62.3030206@freescale.com> <2acbd3e40802050854x5498f4ddnd33637519d602b1d@mail.gmail.com> Message-ID: <47AB23B8.60409@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de David Saada wrote: > +void qe_read_iopin(u8 port, u8 pin, int *data) > +{ > + u32 pin_1bit_mask; > + u32 tmp_val; > + volatile immap_t *im = (volatile immap_t *)CFG_IMMR; > + volatile qepio83xx_t *par_io = (volatile qepio83xx_t Don't use volatile. Use the accessor functions: in_be32 and out_be32. > --- a/common/Makefile 2008-01-23 15:41:38.000000000 +0200 > +++ b/common/Makefile 2008-02-07 11:09:18.087398000 +0200 > @@ -76,6 +76,7 @@ COBJS-y += cmd_nand.o > COBJS-$(CONFIG_CMD_NET) += cmd_net.o > COBJS-y += cmd_nvedit.o > COBJS-y += cmd_onenand.o > +COBJS-$(CONFIG_CMD_PARIO) += cmd_pario.o > ifdef CONFIG_PCI > COBJS-$(CONFIG_CMD_PCI) += cmd_pci.o > endif > --- /dev/null 2008-02-04 11:16:39.378100988 +0200 > +++ b/common/cmd_pario.c 2008-02-07 10:49:33.000000000 +0200 > @@ -0,0 +1,87 @@ > +/* > + * Copyright 2007 ECI Telecommunication. Did you mean 2008? > + * > + * (C) Copyright 2002 David Saada And here > + * > + * See file CREDITS for list of people who contributed to this > + * project. > + * > + * 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. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, > + * MA 02111-1307 USA > + */ > + > +#include > +#include > + > +void qe_read_iopin(u8 port, u8 pin, int *data); > +void qe_write_iopin(u8 port, u8 pin, int data); Put these in a header file. -- Timur Tabi Linux kernel developer at Freescale