Linux-MIPS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2 2/3] mips/jazz: Remove redundant settings and shrink jazz_defconfig
  2020-02-06 23:01 [PATCH v2 0/3] Improve MIPS Magnum support Finn Thain
  2020-02-06 23:01 ` [PATCH v2 3/3] mips/jazz: Update jazz_defconfig for MIPS Magnum Finn Thain
@ 2020-02-06 23:01 ` Finn Thain
  2020-02-06 23:01 ` [PATCH v2 1/3] fbdev/g364fb: Fix build failure Finn Thain
  2020-02-19 19:03 ` [PATCH v2 0/3] Improve MIPS Magnum support Paul Burton
  3 siblings, 0 replies; 7+ messages in thread
From: Finn Thain @ 2020-02-06 23:01 UTC (permalink / raw)
  To: Ralf Baechle, Paul Burton, James Hogan
  Cc: Thomas Bogendoerfer, Philippe Mathieu-Daudé,
	linux-mips, linux-kernel

Remove some redundant assignments, that have no effect on
'make jazz_defconfig':

CONFIG_INET_XFRM_MODE_TRANSPORT=m
CONFIG_INET_XFRM_MODE_TUNNEL=m
CONFIG_CRYPTO_HMAC=y

Also drop the settings relating to crypto, wireless, advanced
networking etc. The Kconfig defaults for these options are fine.

This reduces the size of vmlinux so it can be launched by
"NetBSD/arc Bootstrap, Revision 1.1", which is conveniently available
on NetBSD/arc 5.1 ISO images.

Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 arch/mips/configs/jazz_defconfig | 254 -------------------------------
 1 file changed, 254 deletions(-)

diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig
index 328d4dfeb4cb..b13b2396a8a9 100644
--- a/arch/mips/configs/jazz_defconfig
+++ b/arch/mips/configs/jazz_defconfig
@@ -2,8 +2,6 @@ CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
 CONFIG_PREEMPT_VOLUNTARY=y
 CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_RELAY=y
 CONFIG_EXPERT=y
@@ -18,168 +16,16 @@ CONFIG_BINFMT_MISC=m
 CONFIG_NET=y
 CONFIG_PACKET=m
 CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_NET_KEY_MIGRATE=y
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 CONFIG_NET_IPIP=m
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_TCP_MD5SIG=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
 CONFIG_INET6_AH=m
 CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-CONFIG_NF_CONNTRACK=m
-CONFIG_NF_CONNTRACK_SECMARK=y
-CONFIG_NF_CONNTRACK_EVENTS=y
-CONFIG_NF_CONNTRACK_AMANDA=m
-CONFIG_NF_CONNTRACK_FTP=m
-CONFIG_NF_CONNTRACK_H323=m
-CONFIG_NF_CONNTRACK_IRC=m
-CONFIG_NF_CONNTRACK_PPTP=m
-CONFIG_NF_CONNTRACK_SANE=m
-CONFIG_NF_CONNTRACK_SIP=m
-CONFIG_NF_CONNTRACK_TFTP=m
-CONFIG_NF_CT_NETLINK=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFLOG=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_RAW=m
-CONFIG_DECNET_NF_GRABULATOR=m
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE=m
-CONFIG_DECNET=m
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_HAMRADIO=y
-CONFIG_AX25=m
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-CONFIG_MKISS=m
-CONFIG_6PACK=m
-CONFIG_BPQETHER=m
-CONFIG_CONNECTOR=m
 CONFIG_PARPORT=m
 CONFIG_PARPORT_PC=m
 CONFIG_PARPORT_1284=y
 CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_BPCK6=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_NBD=m
@@ -194,26 +40,10 @@ CONFIG_BLK_DEV_SR=m
 CONFIG_BLK_DEV_SR_VENDOR=y
 CONFIG_SCSI_CONSTANTS=y
 CONFIG_SCSI_SCAN_ASYNC=y
-CONFIG_SCSI_FC_ATTRS=y
-CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_ISCSI_TCP=m
 CONFIG_SCSI_PPA=m
 CONFIG_SCSI_IMM=m
 CONFIG_JAZZ_ESP=y
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=m
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
 CONFIG_NETDEVICES=y
 CONFIG_BONDING=m
 CONFIG_DUMMY=m
@@ -221,16 +51,6 @@ CONFIG_EQUALIZER=m
 CONFIG_TUN=m
 CONFIG_MIPS_JAZZ_SONIC=y
 CONFIG_NE2000=m
-CONFIG_PHYLIB=m
-CONFIG_CICADA_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_MARVELL_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_PLIP=m
-CONFIG_INPUT_FF_MEMLESS=m
 CONFIG_SERIO_PARKBD=m
 CONFIG_SERIO_RAW=m
 CONFIG_VT_HW_CONSOLE_BINDING=y
@@ -239,10 +59,6 @@ CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_8250_DETECT_IRQ=y
 CONFIG_SERIAL_8250_RSA=y
-CONFIG_PRINTER=m
-CONFIG_PPDEV=m
-# CONFIG_HW_RANDOM is not set
-CONFIG_W1=m
 # CONFIG_HWMON is not set
 CONFIG_EXT2_FS=m
 CONFIG_EXT3_FS=y
@@ -263,78 +79,8 @@ CONFIG_VFAT_FS=m
 CONFIG_NTFS_FS=m
 CONFIG_PROC_KCORE=y
 CONFIG_TMPFS=y
-CONFIG_ADFS_FS=m
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_BEFS_FS=m
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-CONFIG_MINIX_FS=m
-CONFIG_HPFS_FS=m
-CONFIG_QNX4FS_FS=m
-CONFIG_ROMFS_FS=m
-CONFIG_SYSV_FS=m
 CONFIG_UFS_FS=m
 CONFIG_NFS_FS=m
 CONFIG_NFSD=m
 CONFIG_NFSD_V3=y
 CONFIG_CIFS=m
-CONFIG_CODA_FS=m
-CONFIG_AFS_FS=m
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-CONFIG_CRYPTO_LRW=m
-CONFIG_CRYPTO_PCBC=m
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_XCBC=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_CAMELLIA=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_FCRYPT=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRC_CCITT=m
-- 
2.24.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/3] fbdev/g364fb: Fix build failure
  2020-02-06 23:01 [PATCH v2 0/3] Improve MIPS Magnum support Finn Thain
  2020-02-06 23:01 ` [PATCH v2 3/3] mips/jazz: Update jazz_defconfig for MIPS Magnum Finn Thain
  2020-02-06 23:01 ` [PATCH v2 2/3] mips/jazz: Remove redundant settings and shrink jazz_defconfig Finn Thain
@ 2020-02-06 23:01 ` Finn Thain
  2020-02-07 14:41   ` Bartlomiej Zolnierkiewicz
  2020-02-08 17:16   ` Philippe Mathieu-Daudé
  2020-02-19 19:03 ` [PATCH v2 0/3] Improve MIPS Magnum support Paul Burton
  3 siblings, 2 replies; 7+ messages in thread
From: Finn Thain @ 2020-02-06 23:01 UTC (permalink / raw)
  To: Ralf Baechle, Paul Burton, James Hogan
  Cc: Thomas Bogendoerfer, Philippe Mathieu-Daudé,
	linux-mips, linux-kernel, Bartlomiej Zolnierkiewicz, dri-devel,
	linux-fbdev

This patch resolves these compiler errors and warnings --

  CC      drivers/video/fbdev/g364fb.o
drivers/video/fbdev/g364fb.c: In function 'g364fb_cursor':
drivers/video/fbdev/g364fb.c:137:9: error: 'x' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:9: note: each undeclared identifier is reported only once for each function it appears in
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontwidth' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c:137:23: error: 'p' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:38: error: 'y' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontheight' [-Werror=implicit-function-declaration]
drivers/video/fbdev/g364fb.c: In function 'g364fb_init':
drivers/video/fbdev/g364fb.c:233:24: error: 'fbvar' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:234:24: error: 'xres' undeclared (first use in this function)
drivers/video/fbdev/g364fb.c:201:14: warning: unused variable 'j' [-Wunused-variable]
drivers/video/fbdev/g364fb.c:197:25: warning: unused variable 'pal_ptr' [-Wunused-variable]

The MIPS Magnum framebuffer console now works when tested in QEMU.

Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 drivers/video/fbdev/g364fb.c | 29 +++--------------------------
 1 file changed, 3 insertions(+), 26 deletions(-)

diff --git a/drivers/video/fbdev/g364fb.c b/drivers/video/fbdev/g364fb.c
index 845b79da2a7c..05837a3b985c 100644
--- a/drivers/video/fbdev/g364fb.c
+++ b/drivers/video/fbdev/g364fb.c
@@ -108,7 +108,6 @@ static int g364fb_pan_display(struct fb_var_screeninfo *var,
 static int g364fb_setcolreg(u_int regno, u_int red, u_int green,
 			    u_int blue, u_int transp,
 			    struct fb_info *info);
-static int g364fb_cursor(struct fb_info *info, struct fb_cursor *cursor);
 static int g364fb_blank(int blank, struct fb_info *info);
 
 static const struct fb_ops g364fb_ops = {
@@ -119,28 +118,8 @@ static const struct fb_ops g364fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= g364fb_cursor,
 };
 
-int g364fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
-{
-	
-	switch (cursor->enable) {
-	case CM_ERASE:
-		*(unsigned int *) CTLA_REG |= CURS_TOGGLE;
-		break;
-
-	case CM_MOVE:
-	case CM_DRAW:
-		*(unsigned int *) CTLA_REG &= ~CURS_TOGGLE;
-		*(unsigned int *) CURS_POS_REG =
-		    ((x * fontwidth(p)) << 12) | ((y * fontheight(p)) -
-						  info->var.yoffset);
-		break;
-	}
-	return 0;
-}
-
 /*
  *  Pan or Wrap the Display
  *
@@ -194,11 +173,9 @@ static int g364fb_setcolreg(u_int regno, u_int red, u_int green,
  */
 int __init g364fb_init(void)
 {
-	volatile unsigned int *pal_ptr =
-	    (volatile unsigned int *) CLR_PAL_REG;
 	volatile unsigned int *curs_pal_ptr =
 	    (volatile unsigned int *) CURS_PAL_REG;
-	int mem, i, j;
+	int mem, i;
 
 	if (fb_get_options("g364fb", NULL))
 		return -ENODEV;
@@ -230,8 +207,8 @@ int __init g364fb_init(void)
 	 */
 	*(unsigned short *) (CURS_PAT_REG + 14 * 64) = 0xffff;
 	*(unsigned short *) (CURS_PAT_REG + 15 * 64) = 0xffff;
-	fb_var.xres_virtual = fbvar.xres;
-	fb_fix.line_length = (xres / 8) * fb_var.bits_per_pixel;
+	fb_var.xres_virtual = fb_var.xres;
+	fb_fix.line_length = fb_var.xres_virtual * fb_var.bits_per_pixel / 8;
 	fb_fix.smem_start = 0x40000000;	/* physical address */
 	/* get size of video memory; this is special for the JAZZ hardware */
 	mem = (r4030_read_reg32(JAZZ_R4030_CONFIG) >> 8) & 3;
-- 
2.24.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 3/3] mips/jazz: Update jazz_defconfig for MIPS Magnum
  2020-02-06 23:01 [PATCH v2 0/3] Improve MIPS Magnum support Finn Thain
@ 2020-02-06 23:01 ` Finn Thain
  2020-02-06 23:01 ` [PATCH v2 2/3] mips/jazz: Remove redundant settings and shrink jazz_defconfig Finn Thain
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Finn Thain @ 2020-02-06 23:01 UTC (permalink / raw)
  To: Ralf Baechle, Paul Burton, James Hogan
  Cc: Thomas Bogendoerfer, Philippe Mathieu-Daudé,
	linux-mips, linux-kernel

Enable some options for machine type, framebuffer, serial controller and
ATA interfaces.

This allows a jazz_defconfig build to work on the emulated MIPS Magnum
machine provided by qemu-system-mips64el.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
This patch enables CONFIG_FB_G364. This depends upon the build fix at
the beginning of this patch series.
---
 arch/mips/configs/jazz_defconfig | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig
index b13b2396a8a9..92085df3e367 100644
--- a/arch/mips/configs/jazz_defconfig
+++ b/arch/mips/configs/jazz_defconfig
@@ -1,5 +1,7 @@
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
 CONFIG_PREEMPT_VOLUNTARY=y
 CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_LOG_BUF_SHIFT=14
@@ -8,6 +10,8 @@ CONFIG_EXPERT=y
 CONFIG_SLAB=y
 CONFIG_MACH_JAZZ=y
 CONFIG_OLIVETTI_M700=y
+CONFIG_MIPS_MAGNUM_4000=y
+CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODVERSIONS=y
@@ -25,6 +29,7 @@ CONFIG_INET6_IPCOMP=m
 CONFIG_PARPORT=m
 CONFIG_PARPORT_PC=m
 CONFIG_PARPORT_1284=y
+CONFIG_DEVTMPFS=y
 CONFIG_BLK_DEV_FD=m
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_CRYPTOLOOP=m
@@ -44,6 +49,8 @@ CONFIG_ISCSI_TCP=m
 CONFIG_SCSI_PPA=m
 CONFIG_SCSI_IMM=m
 CONFIG_JAZZ_ESP=y
+CONFIG_ATA=y
+CONFIG_PATA_LEGACY=y
 CONFIG_NETDEVICES=y
 CONFIG_BONDING=m
 CONFIG_DUMMY=m
@@ -54,11 +61,15 @@ CONFIG_NE2000=m
 CONFIG_SERIO_PARKBD=m
 CONFIG_SERIO_RAW=m
 CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_8250_DETECT_IRQ=y
 CONFIG_SERIAL_8250_RSA=y
+CONFIG_FB=y
+CONFIG_FB_G364=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
 # CONFIG_HWMON is not set
 CONFIG_EXT2_FS=m
 CONFIG_EXT3_FS=y
-- 
2.24.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 0/3] Improve MIPS Magnum support
@ 2020-02-06 23:01 Finn Thain
  2020-02-06 23:01 ` [PATCH v2 3/3] mips/jazz: Update jazz_defconfig for MIPS Magnum Finn Thain
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Finn Thain @ 2020-02-06 23:01 UTC (permalink / raw)
  To: Ralf Baechle, Paul Burton, James Hogan
  Cc: Thomas Bogendoerfer, Philippe Mathieu-Daudé,
	linux-mips, linux-kernel, Bartlomiej Zolnierkiewicz, dri-devel,
	linux-fbdev

A few minor patches are needed to more easily boot a MIPS Magnum build
under QEMU. This series fixes a build failure in the g364fb driver and
modifies jazz_defconfig for use with 'qemu-system-mips64el -M magnum'.

Note that QEMU's dp8393x implementation has bugs, one of which prevents
the Linux jazzsonic driver from probing the chip. I have fixed the bugs
that I know of in a series of patches at,
https://github.com/fthain/qemu/commits/sonic

Changed since v1:
 - Added reviewed-by and tested-by tags from Philippe Mathieu-Daudé.
 - Rebased.


Finn Thain (3):
  fbdev/g364fb: Fix build failure
  mips/jazz: Remove redundant settings and shrink jazz_defconfig
  mips/jazz: Update jazz_defconfig for MIPS Magnum

 arch/mips/configs/jazz_defconfig | 267 ++-----------------------------
 drivers/video/fbdev/g364fb.c     |  29 +---
 2 files changed, 15 insertions(+), 281 deletions(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/3] fbdev/g364fb: Fix build failure
  2020-02-06 23:01 ` [PATCH v2 1/3] fbdev/g364fb: Fix build failure Finn Thain
@ 2020-02-07 14:41   ` Bartlomiej Zolnierkiewicz
  2020-02-08 17:16   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 7+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-02-07 14:41 UTC (permalink / raw)
  To: Finn Thain
  Cc: Ralf Baechle, Paul Burton, James Hogan, Thomas Bogendoerfer,
	Philippe Mathieu-Daudé,
	linux-mips, linux-kernel, dri-devel, linux-fbdev



On 2/7/20 12:01 AM, Finn Thain wrote:
> This patch resolves these compiler errors and warnings --
> 
>   CC      drivers/video/fbdev/g364fb.o
> drivers/video/fbdev/g364fb.c: In function 'g364fb_cursor':
> drivers/video/fbdev/g364fb.c:137:9: error: 'x' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:137:9: note: each undeclared identifier is reported only once for each function it appears in
> drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontwidth' [-Werror=implicit-function-declaration]
> drivers/video/fbdev/g364fb.c:137:23: error: 'p' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:137:38: error: 'y' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontheight' [-Werror=implicit-function-declaration]
> drivers/video/fbdev/g364fb.c: In function 'g364fb_init':
> drivers/video/fbdev/g364fb.c:233:24: error: 'fbvar' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:234:24: error: 'xres' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:201:14: warning: unused variable 'j' [-Wunused-variable]
> drivers/video/fbdev/g364fb.c:197:25: warning: unused variable 'pal_ptr' [-Wunused-variable]
> 
> The MIPS Magnum framebuffer console now works when tested in QEMU.
> 
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/video/fbdev/g364fb.c | 29 +++--------------------------
>  1 file changed, 3 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/video/fbdev/g364fb.c b/drivers/video/fbdev/g364fb.c
> index 845b79da2a7c..05837a3b985c 100644
> --- a/drivers/video/fbdev/g364fb.c
> +++ b/drivers/video/fbdev/g364fb.c
> @@ -108,7 +108,6 @@ static int g364fb_pan_display(struct fb_var_screeninfo *var,
>  static int g364fb_setcolreg(u_int regno, u_int red, u_int green,
>  			    u_int blue, u_int transp,
>  			    struct fb_info *info);
> -static int g364fb_cursor(struct fb_info *info, struct fb_cursor *cursor);
>  static int g364fb_blank(int blank, struct fb_info *info);
>  
>  static const struct fb_ops g364fb_ops = {
> @@ -119,28 +118,8 @@ static const struct fb_ops g364fb_ops = {
>  	.fb_fillrect	= cfb_fillrect,
>  	.fb_copyarea	= cfb_copyarea,
>  	.fb_imageblit	= cfb_imageblit,
> -	.fb_cursor	= g364fb_cursor,
>  };
>  
> -int g364fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
> -{
> -	
> -	switch (cursor->enable) {
> -	case CM_ERASE:
> -		*(unsigned int *) CTLA_REG |= CURS_TOGGLE;
> -		break;
> -
> -	case CM_MOVE:
> -	case CM_DRAW:
> -		*(unsigned int *) CTLA_REG &= ~CURS_TOGGLE;
> -		*(unsigned int *) CURS_POS_REG =
> -		    ((x * fontwidth(p)) << 12) | ((y * fontheight(p)) -
> -						  info->var.yoffset);
> -		break;
> -	}
> -	return 0;
> -}
> -
>  /*
>   *  Pan or Wrap the Display
>   *
> @@ -194,11 +173,9 @@ static int g364fb_setcolreg(u_int regno, u_int red, u_int green,
>   */
>  int __init g364fb_init(void)
>  {
> -	volatile unsigned int *pal_ptr =
> -	    (volatile unsigned int *) CLR_PAL_REG;
>  	volatile unsigned int *curs_pal_ptr =
>  	    (volatile unsigned int *) CURS_PAL_REG;
> -	int mem, i, j;
> +	int mem, i;
>  
>  	if (fb_get_options("g364fb", NULL))
>  		return -ENODEV;
> @@ -230,8 +207,8 @@ int __init g364fb_init(void)
>  	 */
>  	*(unsigned short *) (CURS_PAT_REG + 14 * 64) = 0xffff;
>  	*(unsigned short *) (CURS_PAT_REG + 15 * 64) = 0xffff;
> -	fb_var.xres_virtual = fbvar.xres;
> -	fb_fix.line_length = (xres / 8) * fb_var.bits_per_pixel;
> +	fb_var.xres_virtual = fb_var.xres;
> +	fb_fix.line_length = fb_var.xres_virtual * fb_var.bits_per_pixel / 8;
>  	fb_fix.smem_start = 0x40000000;	/* physical address */
>  	/* get size of video memory; this is special for the JAZZ hardware */
>  	mem = (r4030_read_reg32(JAZZ_R4030_CONFIG) >> 8) & 3;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/3] fbdev/g364fb: Fix build failure
  2020-02-06 23:01 ` [PATCH v2 1/3] fbdev/g364fb: Fix build failure Finn Thain
  2020-02-07 14:41   ` Bartlomiej Zolnierkiewicz
@ 2020-02-08 17:16   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-08 17:16 UTC (permalink / raw)
  To: Finn Thain, Ralf Baechle, Paul Burton, James Hogan
  Cc: Thomas Bogendoerfer, linux-mips, linux-kernel,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev

On 2/7/20 12:01 AM, Finn Thain wrote:
> This patch resolves these compiler errors and warnings --
> 
>   CC      drivers/video/fbdev/g364fb.o
> drivers/video/fbdev/g364fb.c: In function 'g364fb_cursor':
> drivers/video/fbdev/g364fb.c:137:9: error: 'x' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:137:9: note: each undeclared identifier is reported only once for each function it appears in
> drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontwidth' [-Werror=implicit-function-declaration]
> drivers/video/fbdev/g364fb.c:137:23: error: 'p' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:137:38: error: 'y' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:137:7: error: implicit declaration of function 'fontheight' [-Werror=implicit-function-declaration]
> drivers/video/fbdev/g364fb.c: In function 'g364fb_init':
> drivers/video/fbdev/g364fb.c:233:24: error: 'fbvar' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:234:24: error: 'xres' undeclared (first use in this function)
> drivers/video/fbdev/g364fb.c:201:14: warning: unused variable 'j' [-Wunused-variable]
> drivers/video/fbdev/g364fb.c:197:25: warning: unused variable 'pal_ptr' [-Wunused-variable]
> 
> The MIPS Magnum framebuffer console now works when tested in QEMU.
> 
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
> ---
>  drivers/video/fbdev/g364fb.c | 29 +++--------------------------
>  1 file changed, 3 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/video/fbdev/g364fb.c b/drivers/video/fbdev/g364fb.c
> index 845b79da2a7c..05837a3b985c 100644
> --- a/drivers/video/fbdev/g364fb.c
> +++ b/drivers/video/fbdev/g364fb.c
> @@ -108,7 +108,6 @@ static int g364fb_pan_display(struct fb_var_screeninfo *var,
>  static int g364fb_setcolreg(u_int regno, u_int red, u_int green,
>  			    u_int blue, u_int transp,
>  			    struct fb_info *info);
> -static int g364fb_cursor(struct fb_info *info, struct fb_cursor *cursor);
>  static int g364fb_blank(int blank, struct fb_info *info);
>  
>  static const struct fb_ops g364fb_ops = {
> @@ -119,28 +118,8 @@ static const struct fb_ops g364fb_ops = {
>  	.fb_fillrect	= cfb_fillrect,
>  	.fb_copyarea	= cfb_copyarea,
>  	.fb_imageblit	= cfb_imageblit,
> -	.fb_cursor	= g364fb_cursor,
>  };
>  
> -int g364fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
> -{
> -	
> -	switch (cursor->enable) {
> -	case CM_ERASE:
> -		*(unsigned int *) CTLA_REG |= CURS_TOGGLE;
> -		break;
> -
> -	case CM_MOVE:
> -	case CM_DRAW:
> -		*(unsigned int *) CTLA_REG &= ~CURS_TOGGLE;
> -		*(unsigned int *) CURS_POS_REG =
> -		    ((x * fontwidth(p)) << 12) | ((y * fontheight(p)) -
> -						  info->var.yoffset);
> -		break;
> -	}
> -	return 0;
> -}
> -
>  /*
>   *  Pan or Wrap the Display
>   *
> @@ -194,11 +173,9 @@ static int g364fb_setcolreg(u_int regno, u_int red, u_int green,
>   */
>  int __init g364fb_init(void)
>  {
> -	volatile unsigned int *pal_ptr =
> -	    (volatile unsigned int *) CLR_PAL_REG;
>  	volatile unsigned int *curs_pal_ptr =
>  	    (volatile unsigned int *) CURS_PAL_REG;
> -	int mem, i, j;
> +	int mem, i;
>  
>  	if (fb_get_options("g364fb", NULL))
>  		return -ENODEV;
> @@ -230,8 +207,8 @@ int __init g364fb_init(void)
>  	 */
>  	*(unsigned short *) (CURS_PAT_REG + 14 * 64) = 0xffff;
>  	*(unsigned short *) (CURS_PAT_REG + 15 * 64) = 0xffff;
> -	fb_var.xres_virtual = fbvar.xres;
> -	fb_fix.line_length = (xres / 8) * fb_var.bits_per_pixel;
> +	fb_var.xres_virtual = fb_var.xres;
> +	fb_fix.line_length = fb_var.xres_virtual * fb_var.bits_per_pixel / 8;
>  	fb_fix.smem_start = 0x40000000;	/* physical address */
>  	/* get size of video memory; this is special for the JAZZ hardware */
>  	mem = (r4030_read_reg32(JAZZ_R4030_CONFIG) >> 8) & 3;
> 

Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/3] Improve MIPS Magnum support
  2020-02-06 23:01 [PATCH v2 0/3] Improve MIPS Magnum support Finn Thain
                   ` (2 preceding siblings ...)
  2020-02-06 23:01 ` [PATCH v2 1/3] fbdev/g364fb: Fix build failure Finn Thain
@ 2020-02-19 19:03 ` Paul Burton
  3 siblings, 0 replies; 7+ messages in thread
From: Paul Burton @ 2020-02-19 19:03 UTC (permalink / raw)
  To: Finn Thain
  Cc: Ralf Baechle, Paul Burton, James Hogan, Thomas Bogendoerfer,
	Philippe Mathieu-Daudé,
	linux-mips, linux-kernel, Bartlomiej Zolnierkiewicz, dri-devel,
	linux-fbdev, linux-mips

[-- Warning: decoded text below may be mangled --]
[-- Attachment #0: Type: text/plain, Size: 2083 bytes --]

Hello,

Finn Thain wrote:
> A few minor patches are needed to more easily boot a MIPS Magnum build
> under QEMU. This series fixes a build failure in the g364fb driver and
> modifies jazz_defconfig for use with 'qemu-system-mips64el -M magnum'.
> 
> Note that QEMU's dp8393x implementation has bugs, one of which prevents
> the Linux jazzsonic driver from probing the chip. I have fixed the bugs
> that I know of in a series of patches at,
> https://github.com/fthain/qemu/commits/sonic
> 
> Changed since v1:
>  - Added reviewed-by and tested-by tags from Philippe Mathieu-Daudé.
>  - Rebased.
> 
> 
> Finn Thain (3):
>   fbdev/g364fb: Fix build failure
>   mips/jazz: Remove redundant settings and shrink jazz_defconfig
>   mips/jazz: Update jazz_defconfig for MIPS Magnum

Series applied to mips-next.

> fbdev/g364fb: Fix build failure
>   commit c584f9532115
>   https://git.kernel.org/mips/c/c584f9532115
>   
>   Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
>   Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>   Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
>   Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>   Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>   Signed-off-by: Paul Burton <paulburton@kernel.org>
> 
> mips/jazz: Remove redundant settings and shrink jazz_defconfig
>   commit a7047b8dd098
>   https://git.kernel.org/mips/c/a7047b8dd098
>   
>   Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>   Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
>   Signed-off-by: Paul Burton <paulburton@kernel.org>
> 
> mips/jazz: Update jazz_defconfig for MIPS Magnum
>   commit 91f40e896444
>   https://git.kernel.org/mips/c/91f40e896444
>   
>   Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>   Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>   Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
>   Signed-off-by: Paul Burton <paulburton@kernel.org>

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paulburton@kernel.org to report it. ]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 23:01 [PATCH v2 0/3] Improve MIPS Magnum support Finn Thain
2020-02-06 23:01 ` [PATCH v2 3/3] mips/jazz: Update jazz_defconfig for MIPS Magnum Finn Thain
2020-02-06 23:01 ` [PATCH v2 2/3] mips/jazz: Remove redundant settings and shrink jazz_defconfig Finn Thain
2020-02-06 23:01 ` [PATCH v2 1/3] fbdev/g364fb: Fix build failure Finn Thain
2020-02-07 14:41   ` Bartlomiej Zolnierkiewicz
2020-02-08 17:16   ` Philippe Mathieu-Daudé
2020-02-19 19:03 ` [PATCH v2 0/3] Improve MIPS Magnum support Paul Burton

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org
	public-inbox-index linux-mips

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git