[U-Boot-Users] [PATCH v4] QE IO: Add initial data to pin configuration + read/write functions

Timur Tabi timur at freescale.com
Thu Feb 7 16:28:56 CET 2008


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 <david.saada at ecitele.com>

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 <common.h>
> +#include <command.h>
> +
> +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




More information about the U-Boot mailing list