Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Aug 2005 13:32:15 +0200 (CEST)
From:      Simun Mikecin <numisemis@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        john@feith.com
Subject:   ports/85433: [fix] multimedia/pvr250: does not build on FreeBSD 6.x
Message-ID:  <20050829113215.EAA9626D06A@mail.logos.hr>
Resent-Message-ID: <200508291140.j7TBeGms031195@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         85433
>Category:       ports
>Synopsis:       [fix] multimedia/pvr250: does not build on FreeBSD 6.x
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 29 11:40:16 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Simun Mikecin
>Release:        FreeBSD 6.0-BETA3 i386
>Organization:
>Environment:
System: FreeBSD data.home.hr 6.0-BETA3 FreeBSD 6.0-BETA3 #5: Fri Aug 26 22:05:15 CEST 2005 root@data.home.hr:/var/obj/usr/src.6/sys/DATA i386


	
>Description:
Does not build on FreeBSD 6.x. 'make' dies with errors.
	
>How-To-Repeat:
try:
	cd /usr/ports/multimedia/pvr250 && make
	
>Fix:
diff -urN pvr250.orig/files/patch-dev::cxm::cxm.c pvr250/files/patch-dev::cxm::cxm.c
--- pvr250.orig/files/patch-dev::cxm::cxm.c	Thu Jan  1 01:00:00 1970
+++ pvr250/files/patch-dev::cxm::cxm.c	Sun Aug 21 15:55:50 2005
@@ -0,0 +1,18 @@
+--- dev/cxm/cxm.c.orig	Sun Aug 21 15:44:51 2005
++++ dev/cxm/cxm.c	Sun Aug 21 15:46:16 2005
+@@ -56,7 +56,6 @@
+ #  include <sys/select.h>
+ #endif
+ 
+-#include <machine/bus_memio.h>
+ #include <machine/bus.h>
+ #include <machine/clock.h>
+ #include <machine/resource.h>
+@@ -154,7 +153,6 @@
+ 	.d_version =	D_VERSION,
+ 	.d_flags =	D_NEEDGIANT,
+ #endif
+-	.d_maj =	CDEV_MAJOR,
+ 	.d_name =	"cxm",
+ 	.d_open =	cxm_open,
+ 	.d_close =	cxm_close,
diff -urN pvr250.orig/files/patch-dev::cxm::cxm.h pvr250/files/patch-dev::cxm::cxm.h
--- pvr250.orig/files/patch-dev::cxm::cxm.h	Thu Jan  1 01:00:00 1970
+++ pvr250/files/patch-dev::cxm::cxm.h	Sun Aug 21 15:56:01 2005
@@ -0,0 +1,46 @@
+--- dev/cxm/cxm.h.orig	Sun Aug 21 15:44:51 2005
++++ dev/cxm/cxm.h	Sun Aug 21 15:42:27 2005
+@@ -69,7 +69,7 @@
+ struct cxm_buffer_pool {
+ 	bus_dma_tag_t		dmat;
+ 	size_t			offset;
+-	volatile unsigned int	read;
++	unsigned int	read;
+ 	volatile unsigned int	write;
+ 	struct cxm_buffer	bufs[CXM_SG_BUFFERS];
+ };
+@@ -265,7 +265,7 @@
+ 
+ 	int		encoding;
+ 	int		encoding_dma;
+-	volatile int	encoding_eos;
++	int	encoding_eos;
+ };
+ 
+ /*
+@@ -290,7 +290,7 @@
+ /*
+  * Bus resource id
+  */
+-#define CXM_RID PCIR_MAPS
++#define CXM_RID PCIR_BARS
+ 
+ /*
+  * Access macros
+@@ -621,14 +621,14 @@
+ struct cxm_saa7115_audio_clock {
+ 	unsigned int sample_rate;
+ 	unsigned int fps;
+-	const struct cxm_saa7115_command *clock;
++	struct cxm_saa7115_command *clock;
+ };
+ 
+ struct cxm_saa7115_scaling {
+ 	unsigned int width;
+ 	unsigned int height;
+ 	unsigned int fps;
+-	const struct cxm_saa7115_command *scaling;
++	struct cxm_saa7115_command *scaling;
+ };
+ 
+ int cxm_saa7115_init( struct cxm_softc *sc );
diff -urN pvr250.orig/files/patch-dev::cxm::cxm_audio.c pvr250/files/patch-dev::cxm::cxm_audio.c
--- pvr250.orig/files/patch-dev::cxm::cxm_audio.c	Thu Jan  1 01:00:00 1970
+++ pvr250/files/patch-dev::cxm::cxm_audio.c	Sun Aug 21 15:57:37 2005
@@ -0,0 +1,136 @@
+--- dev/cxm/cxm_audio.c.orig	Sun Aug 21 15:44:51 2005
++++ dev/cxm/cxm_audio.c	Sun Aug 21 13:50:04 2005
+@@ -51,7 +51,6 @@
+ #  include <sys/select.h>
+ #endif
+ 
+-#include <machine/bus_memio.h>
+ #include <machine/bus.h>
+ #include <machine/clock.h>
+ #include <machine/resource.h>
+@@ -67,7 +66,7 @@
+ #include "iicbb_if.h"
+ 
+ 
+-static const struct cxm_msp_command
++static struct cxm_msp_command
+ msp34x5G_init = {
+ 	5,
+ 	{
+@@ -84,7 +83,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_msp_command
++static struct cxm_msp_command
+ msp34x5G_select_tuner = {
+ 	3,
+ 	{
+@@ -97,7 +96,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_msp_command
++static struct cxm_msp_command
+ msp34x5D_init = {
+ 	4,
+ 	{
+@@ -112,7 +111,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_msp_command
++static struct cxm_msp_command
+ msp34x5D_select_tuner = {
+ 	5,
+ 	{
+@@ -129,7 +128,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_msp_command
++static struct cxm_msp_command
+ msp34xxx_mute = {
+ 	2,
+ 	{
+@@ -140,7 +139,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_msp_command
++static struct cxm_msp_command
+ msp34xxx_unmute = {
+ 	2,
+ 	{
+@@ -151,7 +150,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_msp_command
++static struct cxm_msp_command
+ msp34xxx_select_fm = {
+ 	3,
+ 	{
+@@ -164,7 +163,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_msp_command
++static struct cxm_msp_command
+ msp34xxx_select_line_in = {
+ 	3,
+ 	{
+@@ -262,7 +261,7 @@
+ static int
+ cxm_msp_dpl_write( device_t iicbus, int i2c_addr,
+ 		   unsigned char dev, unsigned int addr,
+-		   const char *buf, int len )
++		   char *buf, int len )
+ {
+ 	unsigned char msg[3];
+ 	int sent;
+@@ -298,7 +297,7 @@
+ 	unsigned char rev2[2];
+ 	unsigned int i;
+ 	unsigned int nsettings;
+-	const struct cxm_msp_setting *settings;
++	struct cxm_msp_setting *settings;
+ 
+ 	if (cxm_msp_dpl_reset (sc->iicbus, CXM_I2C_MSP3400) < 0)
+ 		return -1;
+@@ -364,7 +363,7 @@
+ {
+ 	unsigned int i;
+ 	unsigned int nsettings;
+-	const struct cxm_msp_setting *settings;
++	struct cxm_msp_setting *settings;
+ 
+ 	nsettings = msp34xxx_mute.nsettings;
+ 	settings = msp34xxx_mute.settings;
+@@ -386,7 +385,7 @@
+ {
+ 	unsigned int i;
+ 	unsigned int nsettings;
+-	const struct cxm_msp_setting *settings;
++	struct cxm_msp_setting *settings;
+ 
+ 	nsettings = msp34xxx_unmute.nsettings;
+ 	settings = msp34xxx_unmute.settings;
+@@ -421,7 +420,7 @@
+ {
+ 	unsigned int i;
+ 	unsigned int nsettings;
+-	const struct cxm_msp_setting *settings;
++	struct cxm_msp_setting *settings;
+ 
+ 	switch (source) {
+ 	case cxm_fm_source:
+@@ -510,7 +509,7 @@
+ 	unsigned int i;
+ 	int locked;
+ 	unsigned int nsettings;
+-	const struct cxm_msp_setting *settings;
++	struct cxm_msp_setting *settings;
+ 
+ 	switch (cxm_msp_selected_source(sc)) {
+ 	case cxm_tuner_source:
diff -urN pvr250.orig/files/patch-dev::cxm::cxm_eeprom.c pvr250/files/patch-dev::cxm::cxm_eeprom.c
--- pvr250.orig/files/patch-dev::cxm::cxm_eeprom.c	Thu Jan  1 01:00:00 1970
+++ pvr250/files/patch-dev::cxm::cxm_eeprom.c	Sun Aug 21 15:57:09 2005
@@ -0,0 +1,10 @@
+--- dev/cxm/cxm_eeprom.c.orig	Sun Aug 21 15:44:51 2005
++++ dev/cxm/cxm_eeprom.c	Sun Aug 21 13:50:17 2005
+@@ -52,7 +52,6 @@
+ #  include <sys/select.h>
+ #endif
+ 
+-#include <machine/bus_memio.h>
+ #include <machine/bus.h>
+ #include <machine/clock.h>
+ #include <machine/resource.h>
diff -urN pvr250.orig/files/patch-dev::cxm::cxm_i2c.c pvr250/files/patch-dev::cxm::cxm_i2c.c
--- pvr250.orig/files/patch-dev::cxm::cxm_i2c.c	Thu Jan  1 01:00:00 1970
+++ pvr250/files/patch-dev::cxm::cxm_i2c.c	Sun Aug 21 15:57:59 2005
@@ -0,0 +1,35 @@
+--- dev/cxm/cxm_i2c.c.orig	Sun Aug 21 15:44:51 2005
++++ dev/cxm/cxm_i2c.c	Sun Aug 21 15:43:50 2005
+@@ -48,7 +48,6 @@
+ #  include <sys/select.h>
+ #endif
+ 
+-#include <machine/bus_memio.h>
+ #include <machine/bus.h>
+ #include <machine/clock.h>
+ #include <machine/resource.h>
+@@ -82,7 +81,6 @@
+ static int	cxm_iic_getsda( device_t );
+ static void	cxm_iic_setscl( device_t, int );
+ static void	cxm_iic_setsda( device_t, int );
+-static void	cxm_iic_setlines( device_t, int, int );
+ 
+ static device_method_t cxm_iic_methods[] = {
+ 	/* Device interface */
+@@ -383,16 +381,4 @@
+ 	 */
+ 
+ 	(void)CSR_READ_4(sc, CXM_REG_I2C_SETSDA);
+-}
+-
+-
+-static void
+-cxm_iic_setlines( device_t dev, int ctrl, int data )
+-{
+-
+-	cxm_iic_setscl(dev, ctrl);
+-	cxm_iic_setsda(dev, data);
+-
+-	/* Wait for 10 usec */
+-	DELAY(10);
+ }
diff -urN pvr250.orig/files/patch-dev::cxm::cxm_ir.c pvr250/files/patch-dev::cxm::cxm_ir.c
--- pvr250.orig/files/patch-dev::cxm::cxm_ir.c	Thu Jan  1 01:00:00 1970
+++ pvr250/files/patch-dev::cxm::cxm_ir.c	Sun Aug 21 15:58:05 2005
@@ -0,0 +1,10 @@
+--- dev/cxm/cxm_ir.c.orig	Sun Aug 21 15:44:51 2005
++++ dev/cxm/cxm_ir.c	Sun Aug 21 13:50:28 2005
+@@ -52,7 +52,6 @@
+ #  include <sys/select.h>
+ #endif
+ 
+-#include <machine/bus_memio.h>
+ #include <machine/bus.h>
+ #include <machine/clock.h>
+ #include <machine/resource.h>
diff -urN pvr250.orig/files/patch-dev::cxm::cxm_tuner.c pvr250/files/patch-dev::cxm::cxm_tuner.c
--- pvr250.orig/files/patch-dev::cxm::cxm_tuner.c	Thu Jan  1 01:00:00 1970
+++ pvr250/files/patch-dev::cxm::cxm_tuner.c	Sun Aug 21 15:58:16 2005
@@ -0,0 +1,19 @@
+--- dev/cxm/cxm_tuner.c.orig	Sun Aug 21 15:44:51 2005
++++ dev/cxm/cxm_tuner.c	Sun Aug 21 13:51:05 2005
+@@ -51,7 +51,6 @@
+ #  include <sys/select.h>
+ #endif
+ 
+-#include <machine/bus_memio.h>
+ #include <machine/bus.h>
+ #include <machine/clock.h>
+ #include <machine/resource.h>
+@@ -536,7 +535,7 @@
+ 
+ /* Write to the tuner registers */
+ static int
+-cxm_tuner_write( device_t iicbus, int i2c_addr, const char *buf, int len )
++cxm_tuner_write( device_t iicbus, int i2c_addr, char *buf, int len )
+ {
+ 	int sent;
+ 
diff -urN pvr250.orig/files/patch-dev::cxm::cxm_video.c pvr250/files/patch-dev::cxm::cxm_video.c
--- pvr250.orig/files/patch-dev::cxm::cxm_video.c	Thu Jan  1 01:00:00 1970
+++ pvr250/files/patch-dev::cxm::cxm_video.c	Sun Aug 21 15:58:29 2005
@@ -0,0 +1,226 @@
+--- dev/cxm/cxm_video.c.orig	Sun Aug 21 15:44:51 2005
++++ dev/cxm/cxm_video.c	Sun Aug 21 15:43:08 2005
+@@ -51,7 +51,6 @@
+ #  include <sys/select.h>
+ #endif
+ 
+-#include <machine/bus_memio.h>
+ #include <machine/bus.h>
+ #include <machine/clock.h>
+ #include <machine/resource.h>
+@@ -67,7 +66,7 @@
+ #include "iicbb_if.h"
+ 
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_init = {
+ 	19,
+ 	{
+@@ -121,7 +120,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_mute = {
+ 	1,
+ 	{
+@@ -130,7 +129,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_unmute = {
+ 	1,
+ 	{
+@@ -139,7 +138,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_select_fm = {
+ 	1,
+ 	{
+@@ -148,7 +147,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_select_line_in_composite = {
+ 	3,
+ 	{
+@@ -162,7 +161,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_select_line_in_svideo = {
+ 	3,
+ 	{
+@@ -176,7 +175,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_select_tuner = {
+ 	3,
+ 	{
+@@ -190,7 +189,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_audio_clock_44100_ntsc = {
+ 	2,
+ 	{
+@@ -200,7 +199,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_audio_clock_44100_pal = {
+ 	2,
+ 	{
+@@ -210,7 +209,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_audio_clock_48000_ntsc = {
+ 	2,
+ 	{
+@@ -220,7 +219,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_audio_clock_48000_pal = {
+ 	2,
+ 	{
+@@ -230,7 +229,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_scaler_vcd_ntsc_double_lines = {
+ 	13,
+ 	{
+@@ -283,7 +282,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_scaler_vcd_pal_double_lines = {
+ 	13,
+ 	{
+@@ -336,7 +335,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_scaler_svcd_ntsc = {
+ 	13,
+ 	{
+@@ -389,7 +388,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_scaler_svcd_pal = {
+ 	13,
+ 	{
+@@ -442,7 +441,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_scaler_dvd_ntsc = {
+ 	13,
+ 	{
+@@ -495,7 +494,7 @@
+ 	}
+ };
+ 
+-static const struct cxm_saa7115_command
++static struct cxm_saa7115_command
+ saa7115_scaler_dvd_pal = {
+ 	13,
+ 	{
+@@ -557,7 +556,7 @@
+ 	{ 48000, 25, &saa7115_audio_clock_48000_pal }
+ };
+ 
+-static const struct cxm_saa7115_scaling
++static struct cxm_saa7115_scaling
+ saa7115_scalings[] = {
+ 	{ 352, 480, 30, &saa7115_scaler_vcd_ntsc_double_lines },
+ 	{ 352, 576, 25, &saa7115_scaler_vcd_pal_double_lines },
+@@ -646,7 +645,7 @@
+ /* Write to the SAA7115 registers */
+ static int
+ cxm_saa7115_write( device_t iicbus, int i2c_addr,
+-		   unsigned char addr, const char *buf, int len )
++		   unsigned char addr, char *buf, int len )
+ {
+ 	unsigned char msg[1];
+ 	int sent;
+@@ -681,7 +680,7 @@
+ 	unsigned char rev;
+ 	unsigned int i;
+ 	unsigned int nsettings;
+-	const struct cxm_saa7115_setting *settings;
++	struct cxm_saa7115_setting *settings;
+ 
+ 	if (cxm_saa7115_reset (sc->iicbus, CXM_I2C_SAA7115) < 0)
+ 		return -1;
+@@ -741,7 +740,7 @@
+ {
+ 	unsigned int i;
+ 	unsigned int nsettings;
+-	const struct cxm_saa7115_setting *settings;
++	struct cxm_saa7115_setting *settings;
+ 
+ 	nsettings = saa7115_mute.nsettings;
+ 	settings = saa7115_mute.settings;
+@@ -762,7 +761,7 @@
+ {
+ 	unsigned int i;
+ 	unsigned int nsettings;
+-	const struct cxm_saa7115_setting *settings;
++	struct cxm_saa7115_setting *settings;
+ 
+ 	nsettings = saa7115_unmute.nsettings;
+ 	settings = saa7115_unmute.settings;
+@@ -783,7 +782,7 @@
+ {
+ 	unsigned int i;
+ 	unsigned int nsettings;
+-	const struct cxm_saa7115_setting *settings;
++	struct cxm_saa7115_setting *settings;
+ 
+ 	switch (source) {
+ 	case cxm_fm_source:
+@@ -830,7 +829,7 @@
+ 	unsigned char task[1];
+ 	unsigned int i;
+ 	unsigned int nsettings;
+-	const struct cxm_saa7115_setting *settings;
++	struct cxm_saa7115_setting *settings;
+ 
+ 	for (i = 0; NUM_ELEMENTS(saa7115_scalings); i++)
+ 		if (saa7115_scalings[i].width == width
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050829113215.EAA9626D06A>