X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fnios2.h;h=0539ec34502beadfd9ca8a09b829b4d5b1c4020b;hb=7bcee5f7eef740c506117e6da1226bc8ec7f466a;hp=df8126a66e4753f84f4299e8a15f78e173c7b57b;hpb=51926d5ee0be029fb45f10f42756df97279f8ad3;p=u-boot diff --git a/include/nios2.h b/include/nios2.h index df8126a66e..0539ec3450 100644 --- a/include/nios2.h +++ b/include/nios2.h @@ -2,30 +2,12 @@ * (C) Copyright 2004, Psyent Corporation * Scott McNutt * - * 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 + * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __NIOS2_H__ #define __NIOS2_H__ -#include - /*------------------------------------------------------------------------ * Control registers -- use with wrctl() & rdctl() *----------------------------------------------------------------------*/ @@ -39,14 +21,8 @@ * Access to control regs *----------------------------------------------------------------------*/ -#define rdctl(reg)\ - ({unsigned int val;\ - asm volatile("rdctl %0, ctl" __stringify(reg) \ - : "=r" (val) ); val;}) - -#define wrctl(reg,val)\ - asm volatile( "wrctl ctl" _str_(reg) ",%0"\ - : : "r" (val)) +#define rdctl(reg) __builtin_rdctl(reg) +#define wrctl(reg, val) __builtin_wrctl(reg, val) /*------------------------------------------------------------------------ * Control reg bit masks